@@ -1018,6 +1018,8 @@ QPair<bool,Settings> MainWindow::getCppcheckSettings()
10181018 QStringList dirs = mProjectFile ->getIncludeDirs ();
10191019 addIncludeDirs (dirs, result);
10201020
1021+ result.inlineSuppressions = mProjectFile ->getInlineSuppression ();
1022+
10211023 const QStringList defines = mProjectFile ->getDefines ();
10221024 for (const QString& define : defines) {
10231025 if (!result.userDefines .empty ())
@@ -1111,6 +1113,8 @@ QPair<bool,Settings> MainWindow::getCppcheckSettings()
11111113 result.setMisraRuleTexts (CheckThread::executeCommand);
11121114 }
11131115 }
1116+ else
1117+ result.inlineSuppressions = mSettings ->value (SETTINGS_INLINE_SUPPRESSIONS, false ).toBool ();
11141118
11151119 // Include directories (and files) are searched in listed order.
11161120 // Global include directories must be added AFTER the per project include
@@ -1135,7 +1139,6 @@ QPair<bool,Settings> MainWindow::getCppcheckSettings()
11351139 result.force = mSettings ->value (SETTINGS_CHECK_FORCE, 1 ).toBool ();
11361140 result.xml = false ;
11371141 result.jobs = mSettings ->value (SETTINGS_CHECK_THREADS, 1 ).toInt ();
1138- result.inlineSuppressions = mSettings ->value (SETTINGS_INLINE_SUPPRESSIONS, false ).toBool ();
11391142 result.certainty .setEnabled (Certainty::inconclusive, mSettings ->value (SETTINGS_INCONCLUSIVE_ERRORS, false ).toBool ());
11401143 if (!mProjectFile || result.platform .type == Platform::Type::Unspecified)
11411144 result.platform .set ((Platform::Type) mSettings ->value (SETTINGS_CHECKED_PLATFORM, 0 ).toInt ());
0 commit comments