GUI: Allow enabling inline suppressions from the GUI.

Ticket #2342 (inline suppressions not available from the GUI)
This commit is contained in:
Kimmo Varis 2010-12-26 18:29:43 +02:00
parent f4581d833d
commit d367243039
4 changed files with 11 additions and 0 deletions

View File

@ -70,6 +70,7 @@ ShowTypes;
#define SETTINGS_LOG_VIEW_HEIGHT "Log/View height"
#define SETTINGS_MAINWND_SPLITTER_STATE "Mainwindow/Vertical splitter state"
#define SETTINGS_GLOBAL_INCLUDE_PATHS "Global include paths"
#define SETTINGS_INLINE_SUPPRESSIONS "Inline suppressions"
/// @}
#endif

View File

@ -395,6 +395,7 @@ Settings MainWindow::GetCppcheckSettings()
result._force = mSettings->value(SETTINGS_CHECK_FORCE, 1).toBool();
result._xml = false;
result._jobs = mSettings->value(SETTINGS_CHECK_THREADS, 1).toInt();
result._inlineSuppressions = mSettings->value(SETTINGS_INLINE_SUPPRESSIONS, false).toBool();
if (result._jobs <= 0)
{

View File

@ -100,6 +100,13 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="mInlineSuppressions">
<property name="text">
<string>Enable inline suppressions</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">

View File

@ -50,6 +50,7 @@ SettingsDialog::SettingsDialog(QSettings *programSettings,
mUI.mShowDebugWarnings->setCheckState(BoolToCheckState(programSettings->value(SETTINGS_SHOW_DEBUG_WARNINGS, false).toBool()));
mUI.mSaveAllErrors->setCheckState(BoolToCheckState(programSettings->value(SETTINGS_SAVE_ALL_ERRORS, false).toBool()));
mUI.mSaveFullPath->setCheckState(BoolToCheckState(programSettings->value(SETTINGS_SAVE_FULL_PATH, false).toBool()));
mUI.mInlineSuppressions->setCheckState(BoolToCheckState(programSettings->value(SETTINGS_INLINE_SUPPRESSIONS, false).toBool()));
connect(mUI.mButtons, SIGNAL(accepted()), this, SLOT(Ok()));
connect(mUI.mButtons, SIGNAL(rejected()), this, SLOT(reject()));
@ -123,6 +124,7 @@ void SettingsDialog::SaveSettingValues()
SaveCheckboxValue(mUI.mShowFullPath, SETTINGS_SHOW_FULL_PATH);
SaveCheckboxValue(mUI.mShowNoErrorsMessage, SETTINGS_SHOW_NO_ERRORS);
SaveCheckboxValue(mUI.mShowDebugWarnings, SETTINGS_SHOW_DEBUG_WARNINGS);
SaveCheckboxValue(mUI.mInlineSuppressions, SETTINGS_INLINE_SUPPRESSIONS);
mSettings->setValue(SETTINGS_GLOBAL_INCLUDE_PATHS, mUI.mEditIncludePaths->text());
}