diff --git a/analyzers/cppcheck/parameters.cpp b/analyzers/cppcheck/parameters.cpp --- a/analyzers/cppcheck/parameters.cpp +++ b/analyzers/cppcheck/parameters.cpp @@ -204,12 +204,12 @@ if (m_project && useProjectIncludes) { QList ignored; - foreach (QString element, applyPlaceholders(ignoredIncludes).split(';')) { + foreach (const QString& element, applyPlaceholders(ignoredIncludes).split(';')) { if (!element.trimmed().isEmpty()) ignored.append(KDevelop::Path(element)); } - foreach (auto dir, m_includeDirectories) { + foreach (const auto& dir, m_includeDirectories) { if (ignored.contains(dir)) continue; diff --git a/analyzers/cppcheck/plugin.cpp b/analyzers/cppcheck/plugin.cpp --- a/analyzers/cppcheck/plugin.cpp +++ b/analyzers/cppcheck/plugin.cpp @@ -300,18 +300,12 @@ KDevelop::ConfigPage* Plugin::perProjectConfigPage(int number, const KDevelop::ProjectConfigOptions& options, QWidget* parent) { - if (number) - return nullptr; - else - return new ProjectConfigPage(this, options.project, parent); + return number ? nullptr : new ProjectConfigPage(this, options.project, parent); } KDevelop::ConfigPage* Plugin::configPage(int number, QWidget* parent) { - if (number) - return nullptr; - else - return new GlobalConfigPage(this, parent); + return number ? nullptr : new GlobalConfigPage(this, parent); } } diff --git a/app/main.cpp b/app/main.cpp --- a/app/main.cpp +++ b/app/main.cpp @@ -120,10 +120,7 @@ : QApplication(argc, argv, GUIenabled) #endif { -#if KDEVELOP_SINGLE_APP Q_UNUSED(GUIenabled); -#endif - connect(this, &QGuiApplication::saveStateRequest, this, &KDevelopApplication::saveState); }