diff --git a/gui/common.h b/gui/common.h index c706fbe0b..a51b6339c 100644 --- a/gui/common.h +++ b/gui/common.h @@ -84,6 +84,7 @@ #define SETTINGS_INCONCLUSIVE_ERRORS "Inconclusive errors" #define SETTINGS_MRU_PROJECTS "MRU Projects" #define SETTINGS_SHOW_ERROR_ID "Show error Id" +#define SETTINGS_SHOW_STATISTICS "Show statistics" // The maximum value for the progress bar #define PROGRESS_MAX 1024.0 diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 29d0bef42..e5069877d 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -763,7 +763,8 @@ void MainWindow::CheckDone() // Notify user - if the window is not active - that check is ready QApplication::alert(this, 3000); - ShowStatistics(); + if (mSettings->value(SETTINGS_SHOW_STATISTICS, false).toBool()) + ShowStatistics(); } void MainWindow::CheckLockDownUI() diff --git a/gui/mainwindow.h b/gui/mainwindow.h index c4db811cd..58ec0c85d 100644 --- a/gui/mainwindow.h +++ b/gui/mainwindow.h @@ -571,7 +571,7 @@ private: bool mExiting; /** - * @brief Set in case of loading project file. + * @brief Set to true in case of loading log file. */ bool mIsLogfileLoaded; diff --git a/gui/settings.ui b/gui/settings.ui index 8f9d0e9e3..1f2b1f0e6 100644 --- a/gui/settings.ui +++ b/gui/settings.ui @@ -150,6 +150,13 @@ + + + + Show statistics on check completion + + + @@ -372,6 +379,7 @@ mSaveFullPath mListLanguages mEnableInconclusive + mShowStatistics mShowDebugWarnings mButtons diff --git a/gui/settingsdialog.cpp b/gui/settingsdialog.cpp index 27b9385b7..0096a7ced 100644 --- a/gui/settingsdialog.cpp +++ b/gui/settingsdialog.cpp @@ -51,6 +51,7 @@ SettingsDialog::SettingsDialog(ApplicationList *list, mUI.mSaveFullPath->setCheckState(BoolToCheckState(settings.value(SETTINGS_SAVE_FULL_PATH, false).toBool())); mUI.mInlineSuppressions->setCheckState(BoolToCheckState(settings.value(SETTINGS_INLINE_SUPPRESSIONS, false).toBool())); mUI.mEnableInconclusive->setCheckState(BoolToCheckState(settings.value(SETTINGS_INCONCLUSIVE_ERRORS, false).toBool())); + mUI.mShowStatistics->setCheckState(BoolToCheckState(settings.value(SETTINGS_SHOW_STATISTICS, false).toBool())); mUI.mShowErrorId->setCheckState(BoolToCheckState(settings.value(SETTINGS_SHOW_ERROR_ID, false).toBool())); connect(mUI.mButtons, SIGNAL(accepted()), this, SLOT(Ok())); @@ -173,6 +174,7 @@ void SettingsDialog::SaveSettingValues() const SaveCheckboxValue(&settings, mUI.mShowDebugWarnings, SETTINGS_SHOW_DEBUG_WARNINGS); SaveCheckboxValue(&settings, mUI.mInlineSuppressions, SETTINGS_INLINE_SUPPRESSIONS); SaveCheckboxValue(&settings, mUI.mEnableInconclusive, SETTINGS_INCONCLUSIVE_ERRORS); + SaveCheckboxValue(&settings, mUI.mShowStatistics, SETTINGS_SHOW_STATISTICS); SaveCheckboxValue(&settings, mUI.mShowErrorId, SETTINGS_SHOW_ERROR_ID); const QListWidgetItem *currentLang = mUI.mListLanguages->currentItem();