From 0d75ebfc8963cde65aa69d858df37c4a5e086a04 Mon Sep 17 00:00:00 2001 From: LoRd_MuldeR Date: Tue, 21 Dec 2021 18:57:29 +0100 Subject: [PATCH] Increased warning level to #4 and fixed a number of warnings. --- LameXP_VS2015.vcxproj | 9 ++++++--- LameXP_VS2017.vcxproj | 9 ++++++--- LameXP_VS2019.vcxproj | 9 ++++++--- src/Config.h | 2 +- src/Decoder_AAC.cpp | 2 +- src/Decoder_AC3.cpp | 2 +- src/Decoder_ADPCM.cpp | 2 +- src/Decoder_ALAC.cpp | 2 +- src/Decoder_Abstract.cpp | 2 +- src/Decoder_Avisynth.cpp | 2 +- src/Decoder_FLAC.cpp | 2 +- src/Decoder_MAC.cpp | 2 +- src/Decoder_MP3.cpp | 2 +- src/Decoder_Musepack.cpp | 2 +- src/Decoder_Opus.cpp | 2 +- src/Decoder_Shorten.cpp | 2 +- src/Decoder_Speex.cpp | 2 +- src/Decoder_TTA.cpp | 2 +- src/Decoder_Vorbis.cpp | 2 +- src/Decoder_WMA.cpp | 2 +- src/Decoder_WavPack.cpp | 2 +- src/Decoder_Wave.cpp | 2 +- src/Dialog_DropBox.cpp | 2 +- src/Dialog_LogView.cpp | 4 ++-- src/Dialog_MainWindow.cpp | 20 ++++++++++---------- src/Dialog_Processing.cpp | 18 +++++++++++------- src/Dialog_Update.cpp | 9 ++++++--- src/Dialog_WorkingBanner.cpp | 6 ++++-- src/Encoder_AAC.cpp | 2 +- src/Encoder_AAC_FDK.cpp | 4 ++-- src/Encoder_AAC_FHG.cpp | 4 ++-- src/Encoder_AAC_QAAC.cpp | 4 ++-- src/Encoder_AC3.cpp | 4 ++-- src/Encoder_DCA.cpp | 4 ++-- src/Encoder_FLAC.cpp | 4 ++-- src/Encoder_MAC.cpp | 4 ++-- src/Encoder_MP3.cpp | 4 ++-- src/Encoder_Opus.cpp | 4 ++-- src/Encoder_Vorbis.cpp | 4 ++-- src/Encoder_Wave.cpp | 6 +++--- src/Filter_Normalize.cpp | 2 +- src/Filter_Resample.cpp | 2 +- src/Filter_ToneAdjust.cpp | 2 +- src/Main.cpp | 4 ++++ src/Model_CueSheet.cpp | 10 +++++----- src/Model_FileExts.cpp | 8 ++++---- src/Model_FileList.cpp | 4 ++-- src/Model_MetaInfo.cpp | 9 ++++----- src/Model_Progress.cpp | 4 ++-- src/Model_Settings.cpp | 6 +++--- src/Model_Settings.h | 4 ++-- src/PlaylistImporter.cpp | 2 +- src/PlaylistImporter.h | 2 +- src/ShellIntegration.cpp | 4 ++-- src/Thread_CueSplitter.cpp | 10 +++++----- src/Thread_FileAnalyzer_Task.cpp | 1 - src/Thread_Initialization.cpp | 10 ++++++---- src/Tool_Abstract.cpp | 2 +- 58 files changed, 140 insertions(+), 118 deletions(-) diff --git a/LameXP_VS2015.vcxproj b/LameXP_VS2015.vcxproj index 496ee5fd..e723a702 100644 --- a/LameXP_VS2015.vcxproj +++ b/LameXP_VS2015.vcxproj @@ -85,11 +85,12 @@ MultiThreadedDebugDLL NoExtensions NotUsing - Level3 + Level4 ProgramDatabase false true Disabled + 4714;4458;4324;4127 "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions) @@ -143,7 +144,7 @@ copy /Y "$(SolutionDir)\..\Prerequisites\VisualLeakDetector\bin\Win32\*.manifest NoExtensions Fast NotUsing - Level3 + Level4 false false false @@ -153,6 +154,7 @@ copy /Y "$(SolutionDir)\..\Prerequisites\VisualLeakDetector\bin\Win32\*.manifest false false false + 4714;4458;4324;4127 "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions) @@ -220,7 +222,7 @@ copy /Y "$(SolutionDir)\..\Prerequisites\Qt4\$(PlatformToolset)\Shared\plugins\i NoExtensions Fast NotUsing - Level3 + Level4 None false false @@ -232,6 +234,7 @@ copy /Y "$(SolutionDir)\..\Prerequisites\Qt4\$(PlatformToolset)\Shared\plugins\i false false + 4714;4458;4324;4127 "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions) diff --git a/LameXP_VS2017.vcxproj b/LameXP_VS2017.vcxproj index fb3de960..77f1df7a 100644 --- a/LameXP_VS2017.vcxproj +++ b/LameXP_VS2017.vcxproj @@ -89,11 +89,12 @@ MultiThreadedDebugDLL NoExtensions NotUsing - Level3 + Level4 ProgramDatabase false true Disabled + 4714;4458;4324;4127 "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions) @@ -147,7 +148,7 @@ copy /Y "$(SolutionDir)\..\Prerequisites\VisualLeakDetector\bin\Win32\*.manifest NoExtensions Fast NotUsing - Level3 + Level4 false false false @@ -157,6 +158,7 @@ copy /Y "$(SolutionDir)\..\Prerequisites\VisualLeakDetector\bin\Win32\*.manifest false false false + 4714;4458;4324;4127 "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions) @@ -225,7 +227,7 @@ copy /Y "$(SolutionDir)\..\Prerequisites\Qt4\v141_xp\Shared\plugins\imageformats NoExtensions Fast NotUsing - Level3 + Level4 None false false @@ -237,6 +239,7 @@ copy /Y "$(SolutionDir)\..\Prerequisites\Qt4\v141_xp\Shared\plugins\imageformats false false + 4714;4458;4324;4127 "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions) diff --git a/LameXP_VS2019.vcxproj b/LameXP_VS2019.vcxproj index fdd80e92..aef6978f 100644 --- a/LameXP_VS2019.vcxproj +++ b/LameXP_VS2019.vcxproj @@ -89,11 +89,12 @@ MultiThreadedDebugDLL NoExtensions NotUsing - Level3 + Level4 ProgramDatabase false true Disabled + 4714;4458;4324;4127 "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions) @@ -147,7 +148,7 @@ copy /Y "$(SolutionDir)\..\Prerequisites\VisualLeakDetector\bin\Win32\*.manifest NoExtensions Fast NotUsing - Level3 + Level4 false false false @@ -157,6 +158,7 @@ copy /Y "$(SolutionDir)\..\Prerequisites\VisualLeakDetector\bin\Win32\*.manifest false false false + 4714;4458;4324;4127 "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions) @@ -224,7 +226,7 @@ copy /Y "$(SolutionDir)\..\Prerequisites\Qt4\$(PlatformToolset)\Shared\plugins\i NoExtensions Fast NotUsing - Level3 + Level4 None false false @@ -236,6 +238,7 @@ copy /Y "$(SolutionDir)\..\Prerequisites\Qt4\$(PlatformToolset)\Shared\plugins\i false false + 4714;4458;4324;4127 "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions) diff --git a/src/Config.h b/src/Config.h index fb5496b2..f6105246 100644 --- a/src/Config.h +++ b/src/Config.h @@ -35,7 +35,7 @@ #define VER_LAMEXP_MINOR_LO 9 #define VER_LAMEXP_TYPE Final #define VER_LAMEXP_PATCH 1 -#define VER_LAMEXP_BUILD 2320 +#define VER_LAMEXP_BUILD 2329 #define VER_LAMEXP_CONFG 2188 /////////////////////////////////////////////////////////////////////////////// diff --git a/src/Decoder_AAC.cpp b/src/Decoder_AAC.cpp index 8ae49cc7..cb0d0b68 100644 --- a/src/Decoder_AAC.cpp +++ b/src/Decoder_AAC.cpp @@ -92,7 +92,7 @@ bool AACDecoder::decode(const QString &sourceFile, const QString &outputFile, QA return (result == RESULT_SUCCESS); } -bool AACDecoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion) +bool AACDecoder::isFormatSupported(const QString &containerType, const QString& /*containerProfile*/, const QString &formatType, const QString &formatProfile, const QString &formatVersion) { if((containerType.compare(QLatin1String("ADTS"), Qt::CaseInsensitive) == 0) || (containerType.compare(QLatin1String("MPEG-4"), Qt::CaseInsensitive) == 0)) { diff --git a/src/Decoder_AC3.cpp b/src/Decoder_AC3.cpp index bb4e6e56..ebce49e8 100644 --- a/src/Decoder_AC3.cpp +++ b/src/Decoder_AC3.cpp @@ -84,7 +84,7 @@ bool AC3Decoder::decode(const QString &sourceFile, const QString &outputFile, QA return (result == RESULT_SUCCESS); } -bool AC3Decoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion) +bool AC3Decoder::isFormatSupported(const QString &containerType, const QString& /*containerProfile*/, const QString &formatType, const QString& /*formatProfile*/, const QString& /*formatVersion*/) { static const QLatin1String ac3("AC-3"), eac3("E-AC-3"), dts("DTS"); if(containerType.compare(ac3, Qt::CaseInsensitive) == 0) diff --git a/src/Decoder_ADPCM.cpp b/src/Decoder_ADPCM.cpp index 81b4aaa6..8e046a1e 100644 --- a/src/Decoder_ADPCM.cpp +++ b/src/Decoder_ADPCM.cpp @@ -86,7 +86,7 @@ bool ADPCMDecoder::decode(const QString &sourceFile, const QString &outputFile, return (result == RESULT_SUCCESS); } -bool ADPCMDecoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion) +bool ADPCMDecoder::isFormatSupported(const QString &containerType, const QString& /*containerProfile*/, const QString &formatType, const QString& /*formatProfile*/, const QString& /*formatVersion*/) { if(containerType.compare(QLatin1String("Wave"), Qt::CaseInsensitive) == 0) { diff --git a/src/Decoder_ALAC.cpp b/src/Decoder_ALAC.cpp index eafc09ed..b329cbb3 100644 --- a/src/Decoder_ALAC.cpp +++ b/src/Decoder_ALAC.cpp @@ -87,7 +87,7 @@ bool ALACDecoder::decode(const QString &sourceFile, const QString &outputFile, Q return (result == RESULT_SUCCESS); } -bool ALACDecoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion) +bool ALACDecoder::isFormatSupported(const QString &containerType, const QString& /*containerProfile*/, const QString &formatType, const QString& /*formatProfile*/, const QString& /*formatVersion*/) { if(containerType.compare(QLatin1String("MPEG-4"), Qt::CaseInsensitive) == 0) { diff --git a/src/Decoder_Abstract.cpp b/src/Decoder_Abstract.cpp index 46acc59f..5c9c523d 100644 --- a/src/Decoder_Abstract.cpp +++ b/src/Decoder_Abstract.cpp @@ -36,7 +36,7 @@ AbstractDecoder::~AbstractDecoder(void) * Default implementation */ -bool AbstractDecoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion) +bool AbstractDecoder::isFormatSupported(const QString& /*containerType*/, const QString& /*containerProfile*/, const QString& /*formatType*/, const QString& /*formatProfile*/, const QString& /*formatVersion*/) { return false; } diff --git a/src/Decoder_Avisynth.cpp b/src/Decoder_Avisynth.cpp index a3d4d039..39ac7125 100644 --- a/src/Decoder_Avisynth.cpp +++ b/src/Decoder_Avisynth.cpp @@ -85,7 +85,7 @@ bool AvisynthDecoder::decode(const QString &sourceFile, const QString &outputFil return (result == RESULT_SUCCESS); } -bool AvisynthDecoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion) +bool AvisynthDecoder::isFormatSupported(const QString &containerType, const QString& /*containerProfile*/, const QString &formatType, const QString& /*formatProfile*/, const QString& /*formatVersion*/) { static const QLatin1String avs("Avisynth"); if(containerType.compare(avs, Qt::CaseInsensitive) == 0) diff --git a/src/Decoder_FLAC.cpp b/src/Decoder_FLAC.cpp index 8ef1b25e..26a2ebd3 100644 --- a/src/Decoder_FLAC.cpp +++ b/src/Decoder_FLAC.cpp @@ -85,7 +85,7 @@ bool FLACDecoder::decode(const QString &sourceFile, const QString &outputFile, Q return (result == RESULT_SUCCESS); } -bool FLACDecoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion) +bool FLACDecoder::isFormatSupported(const QString &containerType, const QString& /*containerProfile*/, const QString &formatType, const QString& /*formatProfile*/, const QString& /*formatVersion*/) { static const QLatin1String flac("FLAC"); if((containerType.compare(flac, Qt::CaseInsensitive) == 0) || (containerType.compare(QLatin1String("OGG"), Qt::CaseInsensitive) == 0)) diff --git a/src/Decoder_MAC.cpp b/src/Decoder_MAC.cpp index 71a7aed4..0b74bda8 100644 --- a/src/Decoder_MAC.cpp +++ b/src/Decoder_MAC.cpp @@ -85,7 +85,7 @@ bool MACDecoder::decode(const QString &sourceFile, const QString &outputFile, QA return (result == RESULT_SUCCESS); } -bool MACDecoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion) +bool MACDecoder::isFormatSupported(const QString &containerType, const QString& /*containerProfile*/, const QString &formatType, const QString& /*formatProfile*/, const QString& /*formatVersion*/) { static const QLatin1String mac("Monkey's Audio"); if(containerType.compare(mac, Qt::CaseInsensitive) == 0) diff --git a/src/Decoder_MP3.cpp b/src/Decoder_MP3.cpp index 8123b52a..8bc37b41 100644 --- a/src/Decoder_MP3.cpp +++ b/src/Decoder_MP3.cpp @@ -102,7 +102,7 @@ bool MP3Decoder::decode(const QString &sourceFile, const QString &outputFile, QA return (result == RESULT_SUCCESS); } -bool MP3Decoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion) +bool MP3Decoder::isFormatSupported(const QString &containerType, const QString& /*containerProfile*/, const QString &formatType, const QString &formatProfile, const QString &formatVersion) { static const QLatin1String mpegAudio("MPEG Audio"), waveAudio("Wave"); if((containerType.compare(mpegAudio, Qt::CaseInsensitive) == 0) || (containerType.compare(waveAudio, Qt::CaseInsensitive) == 0)) diff --git a/src/Decoder_Musepack.cpp b/src/Decoder_Musepack.cpp index 49315d92..b622d4d0 100644 --- a/src/Decoder_Musepack.cpp +++ b/src/Decoder_Musepack.cpp @@ -86,7 +86,7 @@ bool MusepackDecoder::decode(const QString &sourceFile, const QString &outputFil return (result == RESULT_SUCCESS); } -bool MusepackDecoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion) +bool MusepackDecoder::isFormatSupported(const QString &containerType, const QString& /*containerProfile*/, const QString &formatType, const QString& /*formatProfile*/, const QString& /*formatVersion*/) { static const QLatin1String mpc_sv8("Musepack SV8"), mpc_sv7("Musepack SV7"); if((containerType.compare(mpc_sv8, Qt::CaseInsensitive) == 0) || (containerType.compare(mpc_sv7, Qt::CaseInsensitive) == 0)) diff --git a/src/Decoder_Opus.cpp b/src/Decoder_Opus.cpp index d40a6c05..13ab73c6 100644 --- a/src/Decoder_Opus.cpp +++ b/src/Decoder_Opus.cpp @@ -94,7 +94,7 @@ bool OpusDecoder::decode(const QString &sourceFile, const QString &outputFile, Q return (result == RESULT_SUCCESS); } -bool OpusDecoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion) +bool OpusDecoder::isFormatSupported(const QString &containerType, const QString& /*containerProfile*/, const QString &formatType, const QString& /*formatProfile*/, const QString& /*formatVersion*/) { if(containerType.compare(QLatin1String("OGG"), Qt::CaseInsensitive) == 0) { diff --git a/src/Decoder_Shorten.cpp b/src/Decoder_Shorten.cpp index b034d8f5..9f29b3c4 100644 --- a/src/Decoder_Shorten.cpp +++ b/src/Decoder_Shorten.cpp @@ -68,7 +68,7 @@ bool ShortenDecoder::decode(const QString &sourceFile, const QString &outputFile return (awaitProcess(process, abortFlag) == RESULT_SUCCESS); } -bool ShortenDecoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion) +bool ShortenDecoder::isFormatSupported(const QString &containerType, const QString& /*containerProfile*/, const QString &formatType, const QString& /*formatProfile*/, const QString& /*formatVersion*/) { static const QLatin1String shorten("Shorten"); if(containerType.compare(shorten, Qt::CaseInsensitive) == 0) diff --git a/src/Decoder_Speex.cpp b/src/Decoder_Speex.cpp index acce787a..4b0ee874 100644 --- a/src/Decoder_Speex.cpp +++ b/src/Decoder_Speex.cpp @@ -75,7 +75,7 @@ bool SpeexDecoder::decode(const QString &sourceFile, const QString &outputFile, return (result == RESULT_SUCCESS); } -bool SpeexDecoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion) +bool SpeexDecoder::isFormatSupported(const QString &containerType, const QString& /*containerProfile*/, const QString &formatType, const QString& /*formatProfile*/, const QString& /*formatVersion*/) { static const QLatin1String speex("Speex"); if(containerType.compare(speex, Qt::CaseInsensitive) == 0 || containerType.compare(QLatin1String("OGG"), Qt::CaseInsensitive) == 0) diff --git a/src/Decoder_TTA.cpp b/src/Decoder_TTA.cpp index 184b862c..e5415cfc 100644 --- a/src/Decoder_TTA.cpp +++ b/src/Decoder_TTA.cpp @@ -86,7 +86,7 @@ bool TTADecoder::decode(const QString &sourceFile, const QString &outputFile, QA return (result == RESULT_SUCCESS); } -bool TTADecoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion) +bool TTADecoder::isFormatSupported(const QString &containerType, const QString& /*containerProfile*/, const QString &formatType, const QString& /*formatProfile*/, const QString& /*formatVersion*/) { static const QLatin1String tta("TTA"); if(containerType.compare(tta, Qt::CaseInsensitive) == 0) diff --git a/src/Decoder_Vorbis.cpp b/src/Decoder_Vorbis.cpp index 1325d23d..3992eef3 100644 --- a/src/Decoder_Vorbis.cpp +++ b/src/Decoder_Vorbis.cpp @@ -85,7 +85,7 @@ bool VorbisDecoder::decode(const QString &sourceFile, const QString &outputFile, return (result == RESULT_SUCCESS); } -bool VorbisDecoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion) +bool VorbisDecoder::isFormatSupported(const QString &containerType, const QString& /*containerProfile*/, const QString &formatType, const QString& /*formatProfile*/, const QString& /*formatVersion*/) { if(containerType.compare(QLatin1String("OGG"), Qt::CaseInsensitive) == 0) { diff --git a/src/Decoder_WMA.cpp b/src/Decoder_WMA.cpp index d77e7372..2544c27e 100644 --- a/src/Decoder_WMA.cpp +++ b/src/Decoder_WMA.cpp @@ -86,7 +86,7 @@ bool WMADecoder::decode(const QString &sourceFile, const QString &outputFile, QA return (result == RESULT_SUCCESS); } -bool WMADecoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion) +bool WMADecoder::isFormatSupported(const QString &containerType, const QString& /*containerProfile*/, const QString &formatType, const QString &formatProfile, const QString &formatVersion) { if(containerType.compare(QLatin1String("Windows Media"), Qt::CaseInsensitive) == 0) { diff --git a/src/Decoder_WavPack.cpp b/src/Decoder_WavPack.cpp index ae7b02b6..ee29ae96 100644 --- a/src/Decoder_WavPack.cpp +++ b/src/Decoder_WavPack.cpp @@ -85,7 +85,7 @@ bool WavPackDecoder::decode(const QString &sourceFile, const QString &outputFile return (result == RESULT_SUCCESS); } -bool WavPackDecoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion) +bool WavPackDecoder::isFormatSupported(const QString &containerType, const QString& /*containerProfile*/, const QString &formatType, const QString& /*formatProfile*/, const QString& /*formatVersion*/) { static const QLatin1String wavPack("WavPack"); if(containerType.compare(wavPack, Qt::CaseInsensitive) == 0) diff --git a/src/Decoder_Wave.cpp b/src/Decoder_Wave.cpp index 9eab9de9..1c4de880 100644 --- a/src/Decoder_Wave.cpp +++ b/src/Decoder_Wave.cpp @@ -83,7 +83,7 @@ void WaveDecoder::updateProgress(const double &progress) emit statusUpdated(qBound(0, qRound(progress * 100.0), 100)); } -bool WaveDecoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion) +bool WaveDecoder::isFormatSupported(const QString &containerType, const QString& /*containerProfile*/, const QString &formatType, const QString& /*formatProfile*/, const QString& /*formatVersion*/) { if(containerType.compare(QLatin1String("Wave"), Qt::CaseInsensitive) == 0) { diff --git a/src/Dialog_DropBox.cpp b/src/Dialog_DropBox.cpp index 13e5b526..1f1420e2 100644 --- a/src/Dialog_DropBox.cpp +++ b/src/Dialog_DropBox.cpp @@ -135,7 +135,7 @@ void DropBox::changeEvent(QEvent *e) } } -void DropBox::showEvent(QShowEvent *event) +void DropBox::showEvent(QShowEvent* /*event*/) { m_screenGeometry = SCREEN_GEOMETRY(); setFixedSize(ui->dropBoxLabel->pixmap()->size()); diff --git a/src/Dialog_LogView.cpp b/src/Dialog_LogView.cpp index 9d4f480e..502ab193 100644 --- a/src/Dialog_LogView.cpp +++ b/src/Dialog_LogView.cpp @@ -87,7 +87,7 @@ void LogViewDialog::copyButtonClicked(void) mime->setData("text/plain", MUTILS_UTF8(ui->textEdit->toPlainText())); QApplication::clipboard()->setMimeData(mime); m_clipboardUsed = true; - m_oldIcon->swap(ui->buttonCopy->icon()); + *m_oldIcon = ui->buttonCopy->icon(); ui->buttonCopy->setIcon(*m_acceptIcon); ui->buttonCopy->blockSignals(true); QTimer::singleShot(1250, this, SLOT(restoreIcon())); @@ -117,6 +117,6 @@ void LogViewDialog::restoreIcon(void) { ui->buttonCopy->setIcon(*m_oldIcon); ui->buttonCopy->blockSignals(false); - m_oldIcon->swap(QIcon()); + *m_oldIcon = QIcon(); } } diff --git a/src/Dialog_MainWindow.cpp b/src/Dialog_MainWindow.cpp index e691f3ca..a9b4feb6 100644 --- a/src/Dialog_MainWindow.cpp +++ b/src/Dialog_MainWindow.cpp @@ -211,7 +211,7 @@ static inline void MAKE_TRANSPARENT(QWidget *const widget, const bool &flag) } template -static QList& INVERT_LIST(QList &list) +static QList INVERT_LIST(QList list) { if(!list.isEmpty()) { @@ -1401,7 +1401,7 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *event) bool MainWindow::event(QEvent *e) { - switch(e->type()) + switch(static_cast(e->type())) { case MUtils::GUI::USER_EVENT_QUERYENDSESSION: qWarning("System is shutting down, main window prepares to close..."); @@ -1946,7 +1946,7 @@ void MainWindow::tabActionActivated(QAction *action) /* * Handle corner widget Event */ -void MainWindow::cornerWidgetEventOccurred(QWidget *sender, QEvent *event) +void MainWindow::cornerWidgetEventOccurred(QWidget* /*sender*/, QEvent *const event) { if(event->type() == QEvent::MouseButtonPress) { @@ -2050,7 +2050,7 @@ void MainWindow::languageActionActivated(QAction *action) /* * Load language from file action triggered */ -void MainWindow::languageFromFileActionActivated(bool checked) +void MainWindow::languageFromFileActionActivated(bool /*checked*/) { QFileDialog dialog(this, tr("Load Translation")); dialog.setFileMode(QFileDialog::ExistingFile); @@ -2188,7 +2188,7 @@ void MainWindow::disableSlowStartupNotificationsActionTriggered(bool checked) /* * Import a Cue Sheet file */ -void MainWindow::importCueSheetActionTriggered(bool checked) +void MainWindow::importCueSheetActionTriggered(bool /*checked*/) { ABORT_IF_BUSY; WidgetHideHelper hiderHelper(m_dropBox.data()); @@ -2237,7 +2237,7 @@ void MainWindow::importCueSheetActionTriggered(bool checked) /* * Show the "drop box" widget */ -void MainWindow::showDropBoxWidgetActionTriggered(bool checked) +void MainWindow::showDropBoxWidgetActionTriggered(bool /*checked*/) { m_settings->dropBoxWidgetEnabled(true); @@ -3375,7 +3375,7 @@ void MainWindow::centerOutputFolderModel_doAsync(void) /* * File system model asynchronously loaded a dir */ -void MainWindow::outputFolderDirectoryLoaded(const QString &path) +void MainWindow::outputFolderDirectoryLoaded(const QString& /*path*/) { if(m_outputFolderViewCentering) { @@ -3386,7 +3386,7 @@ void MainWindow::outputFolderDirectoryLoaded(const QString &path) /* * File system model inserted new items */ -void MainWindow::outputFolderRowsInserted(const QModelIndex &parent, int start, int end) +void MainWindow::outputFolderRowsInserted(const QModelIndex& /*parent*/, int /*start*/, int /*end*/) { if(m_outputFolderViewCentering) { @@ -3397,7 +3397,7 @@ void MainWindow::outputFolderRowsInserted(const QModelIndex &parent, int start, /* * Directory view item was expanded by user */ -void MainWindow::outputFolderItemExpanded(const QModelIndex &item) +void MainWindow::outputFolderItemExpanded(const QModelIndex& /*item*/) { //We need to stop centering as soon as the user has expanded an item manually! m_outputFolderViewCentering = false; @@ -3406,7 +3406,7 @@ void MainWindow::outputFolderItemExpanded(const QModelIndex &item) /* * View event for output folder control occurred */ -void MainWindow::outputFolderViewEventOccurred(QWidget *sender, QEvent *event) +void MainWindow::outputFolderViewEventOccurred(QWidget* /*sender*/, QEvent *event) { switch(event->type()) { diff --git a/src/Dialog_Processing.cpp b/src/Dialog_Processing.cpp index 5e062734..9dbeb3c4 100644 --- a/src/Dialog_Processing.cpp +++ b/src/Dialog_Processing.cpp @@ -424,7 +424,7 @@ bool ProcessingDialog::eventFilter(QObject *obj, QEvent *event) bool ProcessingDialog::event(QEvent *e) { - switch(e->type()) + switch(static_cast(e->type())) { case MUtils::GUI::USER_EVENT_QUERYENDSESSION: qWarning("System is shutting down, preparing to abort..."); @@ -491,9 +491,10 @@ void ProcessingDialog::initEncoding(void) ui->checkBox_shutdownComputer->setEnabled(true); ui->checkBox_shutdownComputer->setChecked(false); + QIcon defaultIcon(":/icons/control_play_blue.png"); m_taskbar->setTaskbarState(MUtils::Taskbar7::TASKBAR_STATE_NORMAL); m_taskbar->setTaskbarProgress(0, m_pendingJobs.count()); - m_taskbar->setOverlayIcon(&QIcon(":/icons/control_play_blue.png")); + m_taskbar->setOverlayIcon(&defaultIcon); if(!m_diskObserver) { @@ -579,7 +580,7 @@ void ProcessingDialog::startNextJob(void) if(m_settings->samplingRate() > 0) { const int targetRate = SettingsModel::samplingRates[qBound(1, m_settings->samplingRate(), 6)]; - if((targetRate != currentFile.techInfo().audioSamplerate()) || (currentFile.techInfo().audioSamplerate() == 0)) + if((targetRate != static_cast(currentFile.techInfo().audioSamplerate())) || (currentFile.techInfo().audioSamplerate() == 0)) { if (encoder->toEncoderInfo()->isResamplingSupported()) { @@ -692,9 +693,10 @@ void ProcessingDialog::doneEncoding(void) if(m_userAborted) { + QIcon errorIcon(":/icons/error.png"); CHANGE_BACKGROUND_COLOR(ui->frame_header, QColor("#FFFFE0")); m_taskbar->setTaskbarState(MUtils::Taskbar7::TASKBAR_STATE_ERROR); - m_taskbar->setOverlayIcon(&QIcon(":/icons/error.png")); + m_taskbar->setOverlayIcon(&errorIcon); SET_PROGRESS_TEXT((m_succeededJobs.count() > 0) ? tr("Process was aborted by the user after %n file(s)!", "", m_succeededJobs.count()) : tr("Process was aborted prematurely by the user!")); m_systemTray->showMessage(tr("LameXP - Aborted"), tr("Process was aborted by the user."), QSystemTrayIcon::Warning); m_systemTray->setIcon(QIcon(":/icons/cd_delete.png")); @@ -711,9 +713,10 @@ void ProcessingDialog::doneEncoding(void) if(m_failedJobs.count() > 0) { + QIcon warningIcon(":/icons/exclamation.png"); CHANGE_BACKGROUND_COLOR(ui->frame_header, QColor("#FFF0F0")); m_taskbar->setTaskbarState(MUtils::Taskbar7::TASKBAR_STATE_ERROR); - m_taskbar->setOverlayIcon(&QIcon(":/icons/exclamation.png")); + m_taskbar->setOverlayIcon(&warningIcon); if(m_skippedJobs.count() > 0) { SET_PROGRESS_TEXT(tr("Error: %1 of %n file(s) failed (%2). Double-click failed items for detailed information!", "", m_failedJobs.count() + m_succeededJobs.count() + m_skippedJobs.count()).arg(QString::number(m_failedJobs.count()), tr("%n file(s) skipped", "", m_skippedJobs.count()))); @@ -729,9 +732,10 @@ void ProcessingDialog::doneEncoding(void) } else { + QIcon successIcon(":/icons/accept.png"); CHANGE_BACKGROUND_COLOR(ui->frame_header, QColor("#F0FFF0")); m_taskbar->setTaskbarState(MUtils::Taskbar7::TASKBAR_STATE_NORMAL); - m_taskbar->setOverlayIcon(&QIcon(":/icons/accept.png")); + m_taskbar->setOverlayIcon(&successIcon); if(m_skippedJobs.count() > 0) { SET_PROGRESS_TEXT(tr("All files completed successfully. Skipped %n file(s).", "", m_skippedJobs.count())); @@ -829,7 +833,7 @@ void ProcessingDialog::logViewDoubleClicked(const QModelIndex &index) } } -void ProcessingDialog::logViewSectionSizeChanged(int logicalIndex, int oldSize, int newSize) +void ProcessingDialog::logViewSectionSizeChanged(int logicalIndex, int /*oldSize*/, int /*newSize*/) { if(logicalIndex == 1) { diff --git a/src/Dialog_Update.cpp b/src/Dialog_Update.cpp index 7f48d068..1cbac08c 100644 --- a/src/Dialog_Update.cpp +++ b/src/Dialog_Update.cpp @@ -63,8 +63,9 @@ while(0) #define UPDATE_TASKBAR(STATE, ICON) do \ { \ + QIcon _icon((ICON)); \ m_taskbar->setTaskbarState((STATE)); \ - m_taskbar->setOverlayIcon(&QIcon((ICON))); \ + m_taskbar->setOverlayIcon(&_icon); \ } \ while(0) @@ -258,8 +259,9 @@ void UpdateDialog::checkForUpdates(void) } } + QIcon defaultIcon(":/icons/transmit_blue.png"); m_taskbar->setTaskbarState(MUtils::Taskbar7::TASKBAR_STATE_NORMAL); - m_taskbar->setOverlayIcon(&QIcon(":/icons/transmit_blue.png")); + m_taskbar->setOverlayIcon(&defaultIcon); ui->progressBar->setValue(0); ui->installButton->setEnabled(false); @@ -449,9 +451,10 @@ void UpdateDialog::applyUpdate(void) } else { + QIcon warningIcon(":/icons/exclamation.png"); ui->statusLabel->setText(tr("Update failed. Please try again or download manually!")); m_taskbar->setTaskbarState(MUtils::Taskbar7::TASKBAR_STATE_ERROR); - m_taskbar->setOverlayIcon(&QIcon(":/icons/exclamation.png")); + m_taskbar->setOverlayIcon(&warningIcon); m_taskbar->setTaskbarProgress(100, 100); } } diff --git a/src/Dialog_WorkingBanner.cpp b/src/Dialog_WorkingBanner.cpp index 76cf1ab3..75b2fb3d 100644 --- a/src/Dialog_WorkingBanner.cpp +++ b/src/Dialog_WorkingBanner.cpp @@ -162,7 +162,8 @@ void WorkingBanner::show(const QString &text, QThread *thread) connect(thread, SIGNAL(terminated()), loop, SLOT(quit())); //Set taskbar state - m_taskbar->setOverlayIcon(&QIcon(":/icons/hourglass.png")); + QIcon waitingIcon(":/icons/hourglass.png"); + m_taskbar->setOverlayIcon(&waitingIcon); m_taskbar->setTaskbarState(MUtils::Taskbar7::TASKBAR_STATE_INTERMEDIATE); //Start the thread @@ -197,7 +198,8 @@ void WorkingBanner::show(const QString &text, QEventLoop *loop) this->show(text); //Set taskbar state - m_taskbar->setOverlayIcon(&QIcon(":/icons/hourglass.png")); + QIcon waitingIcon(":/icons/hourglass.png"); + m_taskbar->setOverlayIcon(&waitingIcon); m_taskbar->setTaskbarState(MUtils::Taskbar7::TASKBAR_STATE_INTERMEDIATE); //Update cursor diff --git a/src/Encoder_AAC.cpp b/src/Encoder_AAC.cpp index 642709e9..0377a209 100644 --- a/src/Encoder_AAC.cpp +++ b/src/Encoder_AAC.cpp @@ -278,7 +278,7 @@ bool AACEncoder::encode(const QString &sourceFile, const AudioFileModel_MetaInfo return (awaitProcess(process, abortFlag) == RESULT_SUCCESS); } -bool AACEncoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion) +bool AACEncoder::isFormatSupported(const QString &containerType, const QString& /*containerProfile*/, const QString &formatType, const QString& /*formatProfile*/, const QString& /*formatVersion*/) { if(containerType.compare(L1S("Wave"), Qt::CaseInsensitive) == 0) { diff --git a/src/Encoder_AAC_FDK.cpp b/src/Encoder_AAC_FDK.cpp index 40f3b2e4..4a4535bb 100644 --- a/src/Encoder_AAC_FDK.cpp +++ b/src/Encoder_AAC_FDK.cpp @@ -148,7 +148,7 @@ FDKAACEncoder::~FDKAACEncoder(void) { } -bool FDKAACEncoder::encode(const QString &sourceFile, const AudioFileModel_MetaInfo &metaInfo, const unsigned int duration, const unsigned int channels, const QString &outputFile, QAtomicInt &abortFlag) +bool FDKAACEncoder::encode(const QString &sourceFile, const AudioFileModel_MetaInfo &metaInfo, const unsigned int /*duration*/, const unsigned int /*channels*/, const QString &outputFile, QAtomicInt &abortFlag) { QProcess process; QStringList args; @@ -225,7 +225,7 @@ bool FDKAACEncoder::encode(const QString &sourceFile, const AudioFileModel_MetaI return (result == RESULT_SUCCESS); } -bool FDKAACEncoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion) +bool FDKAACEncoder::isFormatSupported(const QString &containerType, const QString& /*containerProfile*/, const QString &formatType, const QString& /*formatProfile*/, const QString& /*formatVersion*/) { if(containerType.compare(L1S("Wave"), Qt::CaseInsensitive) == 0) { diff --git a/src/Encoder_AAC_FHG.cpp b/src/Encoder_AAC_FHG.cpp index 531d5307..815dc948 100644 --- a/src/Encoder_AAC_FHG.cpp +++ b/src/Encoder_AAC_FHG.cpp @@ -146,7 +146,7 @@ FHGAACEncoder::~FHGAACEncoder(void) { } -bool FHGAACEncoder::encode(const QString &sourceFile, const AudioFileModel_MetaInfo &metaInfo, const unsigned int duration, const unsigned int channels, const QString &outputFile, QAtomicInt &abortFlag) +bool FHGAACEncoder::encode(const QString &sourceFile, const AudioFileModel_MetaInfo& /*metaInfo*/, const unsigned int /*duration*/, const unsigned int /*channels*/, const QString &outputFile, QAtomicInt &abortFlag) { QProcess process; QStringList args; @@ -220,7 +220,7 @@ bool FHGAACEncoder::encode(const QString &sourceFile, const AudioFileModel_MetaI return (result == RESULT_SUCCESS); } -bool FHGAACEncoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion) +bool FHGAACEncoder::isFormatSupported(const QString &containerType, const QString& /*containerProfile*/, const QString &formatType, const QString& /*formatProfile*/, const QString& /*formatVersion*/) { if(containerType.compare(L1S("Wave"), Qt::CaseInsensitive) == 0) { diff --git a/src/Encoder_AAC_QAAC.cpp b/src/Encoder_AAC_QAAC.cpp index fd4e73b6..55230d83 100644 --- a/src/Encoder_AAC_QAAC.cpp +++ b/src/Encoder_AAC_QAAC.cpp @@ -157,7 +157,7 @@ QAACEncoder::~QAACEncoder(void) { } -bool QAACEncoder::encode(const QString &sourceFile, const AudioFileModel_MetaInfo &metaInfo, const unsigned int duration, const unsigned int channels, const QString &outputFile, QAtomicInt &abortFlag) +bool QAACEncoder::encode(const QString &sourceFile, const AudioFileModel_MetaInfo &metaInfo, const unsigned int /*duration*/, const unsigned int /*channels*/, const QString &outputFile, QAtomicInt &abortFlag) { const QString qaac_bin = m_binary_qaac64.isEmpty() ? m_binary_qaac32 : m_binary_qaac64; @@ -246,7 +246,7 @@ bool QAACEncoder::encode(const QString &sourceFile, const AudioFileModel_MetaInf return (result == RESULT_SUCCESS); } -bool QAACEncoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion) +bool QAACEncoder::isFormatSupported(const QString &containerType, const QString& /*containerProfile*/, const QString &formatType, const QString& /*formatProfile*/, const QString& /*formatVersion*/) { if(containerType.compare(L1S("Wave"), Qt::CaseInsensitive) == 0) { diff --git a/src/Encoder_AC3.cpp b/src/Encoder_AC3.cpp index 454924ee..fd4c3fbd 100644 --- a/src/Encoder_AC3.cpp +++ b/src/Encoder_AC3.cpp @@ -144,7 +144,7 @@ AC3Encoder::~AC3Encoder(void) { } -bool AC3Encoder::encode(const QString &sourceFile, const AudioFileModel_MetaInfo &metaInfo, const unsigned int duration, const unsigned int channels, const QString &outputFile, QAtomicInt &abortFlag) +bool AC3Encoder::encode(const QString &sourceFile, const AudioFileModel_MetaInfo& /*metaInfo*/, const unsigned int /*duration*/, const unsigned int /*channels*/, const QString &outputFile, QAtomicInt &abortFlag) { QProcess process; QStringList args; @@ -245,7 +245,7 @@ const unsigned int *AC3Encoder::supportedSamplerates(void) return supportedRates; } -bool AC3Encoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion) +bool AC3Encoder::isFormatSupported(const QString &containerType, const QString& /*containerProfile*/, const QString &formatType, const QString& /*formatProfile*/, const QString& /*formatVersion*/) { if(containerType.compare(L1S("Wave"), Qt::CaseInsensitive) == 0) { diff --git a/src/Encoder_DCA.cpp b/src/Encoder_DCA.cpp index a414842c..ce7767f4 100644 --- a/src/Encoder_DCA.cpp +++ b/src/Encoder_DCA.cpp @@ -141,7 +141,7 @@ DCAEncoder::~DCAEncoder(void) { } -bool DCAEncoder::encode(const QString &sourceFile, const AudioFileModel_MetaInfo &metaInfo, const unsigned int duration, const unsigned int channels, const QString &outputFile, QAtomicInt &abortFlag) +bool DCAEncoder::encode(const QString &sourceFile, const AudioFileModel_MetaInfo& /*metaInfo*/, const unsigned int /*duration*/, const unsigned int /*channels*/, const QString &outputFile, QAtomicInt &abortFlag) { QProcess process; QStringList args; @@ -179,7 +179,7 @@ bool DCAEncoder::encode(const QString &sourceFile, const AudioFileModel_MetaInfo return (result == RESULT_SUCCESS); } -bool DCAEncoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion) +bool DCAEncoder::isFormatSupported(const QString &containerType, const QString& /*containerProfile*/, const QString &formatType, const QString& /*formatProfile*/, const QString& /*formatVersion*/) { if(containerType.compare(L1S("Wave"), Qt::CaseInsensitive) == 0) { diff --git a/src/Encoder_FLAC.cpp b/src/Encoder_FLAC.cpp index 08431ab9..c10b8e67 100644 --- a/src/Encoder_FLAC.cpp +++ b/src/Encoder_FLAC.cpp @@ -135,7 +135,7 @@ FLACEncoder::~FLACEncoder(void) { } -bool FLACEncoder::encode(const QString &sourceFile, const AudioFileModel_MetaInfo &metaInfo, const unsigned int duration, const unsigned int channels, const QString &outputFile, QAtomicInt &abortFlag) +bool FLACEncoder::encode(const QString &sourceFile, const AudioFileModel_MetaInfo &metaInfo, const unsigned int /*duration*/, const unsigned int /*channels*/, const QString &outputFile, QAtomicInt &abortFlag) { QProcess process; QStringList args; @@ -188,7 +188,7 @@ bool FLACEncoder::encode(const QString &sourceFile, const AudioFileModel_MetaInf return (result == RESULT_SUCCESS); } -bool FLACEncoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion) +bool FLACEncoder::isFormatSupported(const QString &containerType, const QString& /*containerProfile*/, const QString &formatType, const QString& /*formatProfile*/, const QString& /*formatVersion*/) { if(containerType.compare(L1S("Wave"), Qt::CaseInsensitive) == 0) { diff --git a/src/Encoder_MAC.cpp b/src/Encoder_MAC.cpp index 92d2bdd3..3301113c 100644 --- a/src/Encoder_MAC.cpp +++ b/src/Encoder_MAC.cpp @@ -142,7 +142,7 @@ MACEncoder::~MACEncoder(void) { } -bool MACEncoder::encode(const QString &sourceFile, const AudioFileModel_MetaInfo &metaInfo, const unsigned int duration, const unsigned int channels, const QString &outputFile, QAtomicInt &abortFlag) +bool MACEncoder::encode(const QString &sourceFile, const AudioFileModel_MetaInfo &metaInfo, const unsigned int /*duration*/, const unsigned int /*channels*/, const QString &outputFile, QAtomicInt &abortFlag) { QProcess process; QStringList args; @@ -200,7 +200,7 @@ bool MACEncoder::encode(const QString &sourceFile, const AudioFileModel_MetaInfo return (result == RESULT_SUCCESS); } -bool MACEncoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion) +bool MACEncoder::isFormatSupported(const QString &containerType, const QString& /*containerProfile*/, const QString &formatType, const QString& /*formatProfile*/, const QString& /*formatVersion*/) { if(containerType.compare(L1S("Wave"), Qt::CaseInsensitive) == 0) { diff --git a/src/Encoder_MP3.cpp b/src/Encoder_MP3.cpp index 09ea804b..fdfe6e14 100644 --- a/src/Encoder_MP3.cpp +++ b/src/Encoder_MP3.cpp @@ -157,7 +157,7 @@ MP3Encoder::~MP3Encoder(void) { } -bool MP3Encoder::encode(const QString &sourceFile, const AudioFileModel_MetaInfo &metaInfo, const unsigned int duration, const unsigned int channels, const QString &outputFile, QAtomicInt &abortFlag) +bool MP3Encoder::encode(const QString &sourceFile, const AudioFileModel_MetaInfo &metaInfo, const unsigned int /*duration*/, const unsigned int /*channels*/, const QString &outputFile, QAtomicInt &abortFlag) { QProcess process; QStringList args; @@ -268,7 +268,7 @@ bool MP3Encoder::encode(const QString &sourceFile, const AudioFileModel_MetaInfo return (result == RESULT_SUCCESS); } -bool MP3Encoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion) +bool MP3Encoder::isFormatSupported(const QString &containerType, const QString& /*containerProfile*/, const QString &formatType, const QString &formatProfile, const QString &formatVersion) { if(containerType.compare(L1S("Wave"), Qt::CaseInsensitive) == 0) { diff --git a/src/Encoder_Opus.cpp b/src/Encoder_Opus.cpp index a61c4e95..00d563d8 100644 --- a/src/Encoder_Opus.cpp +++ b/src/Encoder_Opus.cpp @@ -142,7 +142,7 @@ OpusEncoder::~OpusEncoder(void) { } -bool OpusEncoder::encode(const QString &sourceFile, const AudioFileModel_MetaInfo &metaInfo, const unsigned int duration, const unsigned int channels, const QString &outputFile, QAtomicInt &abortFlag) +bool OpusEncoder::encode(const QString &sourceFile, const AudioFileModel_MetaInfo &metaInfo, const unsigned int /*duration*/, const unsigned int /*channels*/, const QString &outputFile, QAtomicInt &abortFlag) { QProcess process; QStringList args; @@ -270,7 +270,7 @@ void OpusEncoder::setFrameSize(int frameSize) m_configFrameSize = qBound(0, frameSize, 5); } -bool OpusEncoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion) +bool OpusEncoder::isFormatSupported(const QString &containerType, const QString& /*containerProfile*/, const QString &formatType, const QString& /*formatProfile*/, const QString& /*formatVersion*/) { if(containerType.compare(L1S("Wave"), Qt::CaseInsensitive) == 0) { diff --git a/src/Encoder_Vorbis.cpp b/src/Encoder_Vorbis.cpp index a1272363..eb77b188 100644 --- a/src/Encoder_Vorbis.cpp +++ b/src/Encoder_Vorbis.cpp @@ -141,7 +141,7 @@ VorbisEncoder::~VorbisEncoder(void) { } -bool VorbisEncoder::encode(const QString &sourceFile, const AudioFileModel_MetaInfo &metaInfo, const unsigned int duration, const unsigned int channels, const QString &outputFile, QAtomicInt &abortFlag) +bool VorbisEncoder::encode(const QString &sourceFile, const AudioFileModel_MetaInfo &metaInfo, const unsigned int /*duration*/, const unsigned int /*channels*/, const QString &outputFile, QAtomicInt &abortFlag) { QProcess process; QStringList args; @@ -220,7 +220,7 @@ bool VorbisEncoder::encode(const QString &sourceFile, const AudioFileModel_MetaI return (result == RESULT_SUCCESS); } -bool VorbisEncoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion) +bool VorbisEncoder::isFormatSupported(const QString &containerType, const QString& /*containerProfile*/, const QString &formatType, const QString& /*formatProfile*/, const QString& /*formatVersion*/) { if(containerType.compare(L1S("Wave"), Qt::CaseInsensitive) == 0) { diff --git a/src/Encoder_Wave.cpp b/src/Encoder_Wave.cpp index 3561a218..25cab70a 100644 --- a/src/Encoder_Wave.cpp +++ b/src/Encoder_Wave.cpp @@ -72,7 +72,7 @@ public: } } - virtual int valueAt(int mode, int index) const + virtual int valueAt(int mode, int /*index*/) const { switch(mode) { @@ -132,7 +132,7 @@ WaveEncoder::~WaveEncoder(void) { } -bool WaveEncoder::encode(const QString &sourceFile, const AudioFileModel_MetaInfo &metaInfo, const unsigned int duration, const unsigned int channels, const QString &outputFile, QAtomicInt &abortFlag) +bool WaveEncoder::encode(const QString &sourceFile, const AudioFileModel_MetaInfo& /*metaInfo*/, const unsigned int /*duration*/, const unsigned int /*channels*/, const QString &outputFile, QAtomicInt &abortFlag) { emit messageLogged(QString("Copy file \"%1\" to \"%2\"\n").arg(sourceFile, outputFile)); @@ -169,7 +169,7 @@ void WaveEncoder::updateProgress(const double &progress) emit statusUpdated(qRound(progress * 100.0)); } -bool WaveEncoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion) +bool WaveEncoder::isFormatSupported(const QString &containerType, const QString& /*containerProfile*/, const QString &formatType, const QString& /*formatProfile*/, const QString& /*formatVersion*/) { if(containerType.compare(L1S("Wave"), Qt::CaseInsensitive) == 0) { diff --git a/src/Filter_Normalize.cpp b/src/Filter_Normalize.cpp index 590d0f14..79df825a 100644 --- a/src/Filter_Normalize.cpp +++ b/src/Filter_Normalize.cpp @@ -57,7 +57,7 @@ NormalizeFilter::~NormalizeFilter(void) { } -AbstractFilter::FilterResult NormalizeFilter::apply(const QString &sourceFile, const QString &outputFile, AudioFileModel_TechInfo *const formatInfo, QAtomicInt &abortFlag) +AbstractFilter::FilterResult NormalizeFilter::apply(const QString &sourceFile, const QString &outputFile, AudioFileModel_TechInfo* /*formatInfo*/, QAtomicInt &abortFlag) { QProcess process; QStringList args; diff --git a/src/Filter_Resample.cpp b/src/Filter_Resample.cpp index f60022e1..47ba2c1e 100644 --- a/src/Filter_Resample.cpp +++ b/src/Filter_Resample.cpp @@ -66,7 +66,7 @@ AbstractFilter::FilterResult ResampleFilter::apply(const QString &sourceFile, co QProcess process; QStringList args; - if((m_samplingRate == formatInfo->audioSamplerate()) && (m_bitDepth == formatInfo->audioBitdepth())) + if((m_samplingRate == static_cast(formatInfo->audioSamplerate())) && (m_bitDepth == static_cast(formatInfo->audioBitdepth()))) { messageLogged("Skipping resample filter!"); qDebug("Resampling filter target samplerate/bitdepth is equals to the format of the input file, skipping!"); diff --git a/src/Filter_ToneAdjust.cpp b/src/Filter_ToneAdjust.cpp index c9a6c10b..446aed5b 100644 --- a/src/Filter_ToneAdjust.cpp +++ b/src/Filter_ToneAdjust.cpp @@ -51,7 +51,7 @@ ToneAdjustFilter::~ToneAdjustFilter(void) { } -AbstractFilter::FilterResult ToneAdjustFilter::apply(const QString &sourceFile, const QString &outputFile, AudioFileModel_TechInfo *const formatInfo, QAtomicInt &abortFlag) +AbstractFilter::FilterResult ToneAdjustFilter::apply(const QString &sourceFile, const QString &outputFile, AudioFileModel_TechInfo* /*formatInfo*/, QAtomicInt &abortFlag) { QProcess process; QStringList args; diff --git a/src/Main.cpp b/src/Main.cpp index 055e7208..44e13e34 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -54,6 +54,8 @@ #include #endif + + /////////////////////////////////////////////////////////////////////////////// // Helper functions /////////////////////////////////////////////////////////////////////////////// @@ -174,6 +176,8 @@ static int lamexp_main_loop(const MUtils::OS::ArgumentMap &arguments, const MUti // Main function /////////////////////////////////////////////////////////////////////////////// +#pragma warning(disable: 4456) + static int lamexp_main(int &argc, char **argv) { int iResult = -1; diff --git a/src/Model_CueSheet.cpp b/src/Model_CueSheet.cpp index eed21d06..691e6c56 100644 --- a/src/Model_CueSheet.cpp +++ b/src/Model_CueSheet.cpp @@ -155,7 +155,7 @@ QModelIndex CueSheetModel::index(int row, int column, const QModelIndex &parent) return QModelIndex(); } -int CueSheetModel::columnCount(const QModelIndex &parent) const +int CueSheetModel::columnCount(const QModelIndex& /*parent*/) const { QMutexLocker lock(&m_mutex); return 4; @@ -195,7 +195,7 @@ QModelIndex CueSheetModel::parent(const QModelIndex &child) const return QModelIndex(); } -QVariant CueSheetModel::headerData (int section, Qt::Orientation orientation, int role) const +QVariant CueSheetModel::headerData (int section, Qt::Orientation /*orientation*/, int role) const { QMutexLocker lock(&m_mutex); @@ -744,13 +744,13 @@ int CueSheetModel::parseCueFile(QFile &cueFile, const QDir &baseDir, QCoreApplic MUtils::OS::sleep_ms(10); } - CueSheetFile *currentFile = m_files.at(i); + currentFile = m_files.at(i); int nTracks = currentFile->trackCount(); if(nTracks > 1) { for(int j = 1; j < nTracks; j++) { - CueSheetTrack *currentTrack = currentFile->track(j); + currentTrack = currentFile->track(j); CueSheetTrack *previousTrack = currentFile->track(j-1); double duration = currentTrack->startIndex() - previousTrack->startIndex(); previousTrack->setDuration(qMax(0.0, duration)); @@ -776,7 +776,7 @@ int CueSheetModel::parseCueFile(QFile &cueFile, const QDir &baseDir, QCoreApplic application->processEvents(); MUtils::OS::sleep_ms(10); } - CueSheetFile *currentFile = m_files.at(i); + currentFile = m_files.at(i); int nTracks = currentFile->trackCount(); if(nTracks > 1) { diff --git a/src/Model_FileExts.cpp b/src/Model_FileExts.cpp index 7e404991..167fd971 100644 --- a/src/Model_FileExts.cpp +++ b/src/Model_FileExts.cpp @@ -86,12 +86,12 @@ FileExtsModel::~FileExtsModel(void) // Public Functions //////////////////////////////////////////////////////////// -int FileExtsModel::columnCount(const QModelIndex &parent) const +int FileExtsModel::columnCount(const QModelIndex& /*parent*/) const { return 2; } -int FileExtsModel::rowCount(const QModelIndex &parent) const +int FileExtsModel::rowCount(const QModelIndex& /*parent*/) const { return m_fileExt.count(); } @@ -155,12 +155,12 @@ QVariant FileExtsModel::headerData(int section, Qt::Orientation orientation, int } } -QModelIndex FileExtsModel::index(int row, int column, const QModelIndex & parent) const +QModelIndex FileExtsModel::index(int row, int column, const QModelIndex& /*parent*/) const { return createIndex(row, column, qHash((qint64(row) << 32)| qint64(column))); } -QModelIndex FileExtsModel::parent(const QModelIndex & index) const +QModelIndex FileExtsModel::parent(const QModelIndex& /*index*/) const { return QModelIndex(); } diff --git a/src/Model_FileList.cpp b/src/Model_FileList.cpp index 4b127fba..fab1c9bf 100644 --- a/src/Model_FileList.cpp +++ b/src/Model_FileList.cpp @@ -69,12 +69,12 @@ FileListModel::~FileListModel(void) // Public Functions //////////////////////////////////////////////////////////// -int FileListModel::columnCount(const QModelIndex &parent) const +int FileListModel::columnCount(const QModelIndex& /*parent*/) const { return 2; } -int FileListModel::rowCount(const QModelIndex &parent) const +int FileListModel::rowCount(const QModelIndex& /*parent*/) const { return m_fileList.count(); } diff --git a/src/Model_MetaInfo.cpp b/src/Model_MetaInfo.cpp index daca054a..2bf13db8 100644 --- a/src/Model_MetaInfo.cpp +++ b/src/Model_MetaInfo.cpp @@ -69,12 +69,12 @@ MetaInfoModel::~MetaInfoModel(void) // Public Functions //////////////////////////////////////////////////////////// -int MetaInfoModel::columnCount(const QModelIndex &parent) const +int MetaInfoModel::columnCount(const QModelIndex& /*parent*/) const { return 2; } -int MetaInfoModel::rowCount(const QModelIndex &parent) const +int MetaInfoModel::rowCount(const QModelIndex& /*parent*/) const { return MODEL_ROW_COUNT - m_offset; } @@ -304,7 +304,6 @@ bool MetaInfoModel::setData (const QModelIndex &index, const QVariant &value, in void MetaInfoModel::editItem(const QModelIndex &index, QWidget *parent) { - bool ok = false; int val = -1; QStringList generes(QString("(%1)").arg(tr("Unspecified"))); QString temp; @@ -327,8 +326,8 @@ void MetaInfoModel::editItem(const QModelIndex &index, QWidget *parent) { QMessageBox::warning(parent, tr("Edit Title"), tr("The title must not be empty. Generating title from file name!")); temp = QFileInfo(m_fullInfo->filePath()).completeBaseName().replace("_", " ").simplified(); - int index = temp.lastIndexOf(" - "); - if(index >= 0) temp = temp.mid(index + 3).trimmed(); + const int idx = temp.lastIndexOf(" - "); + if(idx >= 0) temp = temp.mid(idx + 3).trimmed(); } beginResetModel(); m_metaInfo->setTitle(temp.isEmpty() ? QString() : temp); diff --git a/src/Model_Progress.cpp b/src/Model_Progress.cpp index cda9b04c..d6ab1c0d 100644 --- a/src/Model_Progress.cpp +++ b/src/Model_Progress.cpp @@ -46,12 +46,12 @@ ProgressModel::~ProgressModel(void) { } -int ProgressModel::columnCount(const QModelIndex &parent) const +int ProgressModel::columnCount(const QModelIndex& /*parent*/) const { return 2; } -int ProgressModel::rowCount(const QModelIndex &parent) const +int ProgressModel::rowCount(const QModelIndex& /*parent*/) const { return m_jobList.count(); } diff --git a/src/Model_Settings.cpp b/src/Model_Settings.cpp index fba577a4..f78b847f 100644 --- a/src/Model_Settings.cpp +++ b/src/Model_Settings.cpp @@ -548,9 +548,9 @@ QString SettingsModel::defaultLanguage(void) const //Try to find a suitable translation for the user's system language *and* country for(QStringList::ConstIterator iter = languages.constBegin(); iter != languages.constEnd(); iter++) { - if(MUtils::Translation::get_sysid(*iter) == systemLanguage.language()) + if(MUtils::Translation::get_sysid(*iter) == static_cast(systemLanguage.language())) { - if(MUtils::Translation::get_country(*iter) == systemLanguage.country()) + if(MUtils::Translation::get_country(*iter) == static_cast(systemLanguage.country())) { m_defaultLanguage.reset(new QString(*iter)); return (*iter); @@ -561,7 +561,7 @@ QString SettingsModel::defaultLanguage(void) const //Try to find a suitable translation for the user's system language for(QStringList::ConstIterator iter = languages.constBegin(); iter != languages.constEnd(); iter++) { - if(MUtils::Translation::get_sysid(*iter) == systemLanguage.language()) + if(MUtils::Translation::get_sysid(*iter) == static_cast(systemLanguage.language())) { m_defaultLanguage.reset(new QString(*iter)); return (*iter); diff --git a/src/Model_Settings.h b/src/Model_Settings.h index c86e6951..bf8067a8 100644 --- a/src/Model_Settings.h +++ b/src/Model_Settings.h @@ -212,8 +212,8 @@ public: void syncNow(void); private: - SettingsModel(const SettingsModel &other) {} - SettingsModel &operator=(const SettingsModel &other) { return *this; } + SettingsModel(const SettingsModel& /*other*/) {} + SettingsModel &operator=(const SettingsModel& /*other*/) { return *this; } QString initDirectory(const QString &path) const; QString defaultLanguage(void) const; diff --git a/src/PlaylistImporter.cpp b/src/PlaylistImporter.cpp index 3248c226..2ee2cfee 100644 --- a/src/PlaylistImporter.cpp +++ b/src/PlaylistImporter.cpp @@ -366,7 +366,7 @@ void PlaylistImporter::fixFilePath(QFileInfo &filename, const QDir &baseDir, con } } -QString &PlaylistImporter::unescapeXml(QString &str) +QString PlaylistImporter::unescapeXml(QString str) { for(int i = 0; (g_xmlEscapeSequence[i].escape && g_xmlEscapeSequence[i].output); i++) { diff --git a/src/PlaylistImporter.h b/src/PlaylistImporter.h index 986ccff4..bbd70c09 100644 --- a/src/PlaylistImporter.h +++ b/src/PlaylistImporter.h @@ -52,5 +52,5 @@ private: static playlist_t isPlaylist(const QString &fileName); static void fixFilePath(QFileInfo &filename, const QDir &baseDir, const QDir &rootDir); - static QString &unescapeXml(QString &str); + static QString unescapeXml(QString str); }; diff --git a/src/ShellIntegration.cpp b/src/ShellIntegration.cpp index cfa7071f..90f9f55a 100644 --- a/src/ShellIntegration.cpp +++ b/src/ShellIntegration.cpp @@ -200,7 +200,7 @@ void ShellIntegration::remove(bool async) // Private Functions //////////////////////////////////////////////////////////// -void ShellIntegration::initializeTypes(const QString &lamexpFileType, const QString &lamexpShellAction, QStringList &nativeTypes) +void ShellIntegration::initializeTypes(const QString &lamexpFileType, const QString& /*lamexpShellAction*/, QStringList &nativeTypes) { nativeTypes.clear(); const QString progId = "Progid"; @@ -212,7 +212,7 @@ void ShellIntegration::initializeTypes(const QString &lamexpFileType, const QStr const QString currentExt = (*iter).mid(1).trimmed(); /*remove leading asterisk*/ if(currentExt.isEmpty() || (!currentExt.startsWith('.'))) { - qWarning("Invalid file extension '%s' encountered -> skipping!", currentExt); + qWarning("Invalid file extension '%s' encountered -> skipping!", MUTILS_UTF8(currentExt)); continue; } diff --git a/src/Thread_CueSplitter.cpp b/src/Thread_CueSplitter.cpp index ec2bcd12..ae40c3fb 100644 --- a/src/Thread_CueSplitter.cpp +++ b/src/Thread_CueSplitter.cpp @@ -238,7 +238,7 @@ void CueSplitter::run() // Slots //////////////////////////////////////////////////////////// -void CueSplitter::handleUpdate(int progress) +void CueSplitter::handleUpdate(int /*progress*/) { //QString("%1 [%2]").arg(m_activeFile, QString::number(progress))) } @@ -383,16 +383,16 @@ void CueSplitter::splitFile(const QString &output, const int trackNo, const QStr unsigned int duration[3U]; if (MUtils::regexp_parse_uint32(rxDuration, duration, 3U)) { - unsigned intputLen = (duration[0U] * 3600) + (duration[1U] * 60) + duration[2U]; + unsigned int intputLen = (duration[0U] * 3600) + (duration[1U] * 60) + duration[2U]; if (length == std::numeric_limits::infinity()) { qDebug("Duration updated from SoX info!"); - int duration = intputLen - static_cast(floor(offset + 0.5)); - if (duration < 0) + int durationSecs = intputLen - static_cast(floor(offset + 0.5)); + if (durationSecs < 0) { qWarning("Track is out of bounds: Track offset exceeds input file duration!"); } - outFileInfo.techInfo().setDuration(qMax(0, duration)); + outFileInfo.techInfo().setDuration(qMax(0, durationSecs)); } else { diff --git a/src/Thread_FileAnalyzer_Task.cpp b/src/Thread_FileAnalyzer_Task.cpp index f86c86c0..222ae572 100644 --- a/src/Thread_FileAnalyzer_Task.cpp +++ b/src/Thread_FileAnalyzer_Task.cpp @@ -280,7 +280,6 @@ const AudioFileModel& AnalyzeTask::analyzeMediaFile(const QString &filePath, Aud { //bool skipNext = false; QPair id_val(UINT_MAX, UINT_MAX); - quint32 coverType = UINT_MAX; QByteArray coverData; QStringList params; diff --git a/src/Thread_Initialization.cpp b/src/Thread_Initialization.cpp index bf0211d3..7cb382ac 100644 --- a/src/Thread_Initialization.cpp +++ b/src/Thread_Initialization.cpp @@ -129,7 +129,7 @@ public: { if(s_errMsg[0]) { - strncpy_s(buffer, BUFF_SIZE, s_errMsg, _TRUNCATE); + strncpy_s(buffer, buffSize, s_errMsg, _TRUNCATE); return true; } return false; @@ -294,6 +294,8 @@ public: protected: void taskMain(void) { + QRegExp regExpVer = MAKE_REGEXP(m_encoder_info->regExpVer); + QRegExp regExpSig = MAKE_REGEXP(m_encoder_info->regExpSig); initAacEncImpl ( m_encoder_info->toolName, @@ -303,13 +305,13 @@ protected: m_encoder_info->verDigits, m_encoder_info->verShift, m_encoder_info->verStr, - MAKE_REGEXP(m_encoder_info->regExpVer), - MAKE_REGEXP(m_encoder_info->regExpSig), + regExpVer, + regExpSig, m_encoder_info->regExpLib[0] ? createRegExpList(m_encoder_info->regExpLib) : QList() ); } - static void initAacEncImpl(const char *const toolName, const char *const fileNames[], const QStringList &checkArgs, const quint32 &toolMinVersion, const quint32 &verDigits, const quint32 &verShift, const char *const verStr, QRegExp ®ExpVer, QRegExp ®ExpSig = QRegExp(), const QList ®ExpLib = QList()); + static void initAacEncImpl(const char *const toolName, const char *const fileNames[], const QStringList &checkArgs, const quint32 &toolMinVersion, const quint32 &verDigits, const quint32 &verShift, const char *const verStr, QRegExp ®ExpVer, QRegExp ®ExpSig, const QList ®ExpLib = QList()); private: const aac_encoder_t *const m_encoder_info; diff --git a/src/Tool_Abstract.cpp b/src/Tool_Abstract.cpp index 1c0a3f50..aa89e536 100644 --- a/src/Tool_Abstract.cpp +++ b/src/Tool_Abstract.cpp @@ -161,7 +161,7 @@ bool AbstractTool::startProcess(QProcess &process, const QString &program, const */ AbstractTool::result_t AbstractTool::awaitProcess(QProcess &process, QAtomicInt &abortFlag, int *const exitCode) { - return awaitProcess(process, abortFlag, [](const QString &text) { return false; }, exitCode); + return awaitProcess(process, abortFlag, [](const QString& /*text*/) { return false; }, exitCode); } /*