forked from qt-creator/qt-creator
CppCheck: Use new settings pattern
Change-Id: Ia2de8e684690ab7bfbdcf7ba417df1f2174433de Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
#include "cppcheckconstants.h"
|
||||
#include "cppcheckdiagnosticview.h"
|
||||
#include "cppcheckoptions.h"
|
||||
#include "cppchecktextmarkmanager.h"
|
||||
#include "cppchecktool.h"
|
||||
#include "cppchecktr.h"
|
||||
@@ -39,11 +40,10 @@ public:
|
||||
explicit CppcheckPluginPrivate();
|
||||
|
||||
CppcheckTextMarkManager marks;
|
||||
CppcheckOptions options;
|
||||
CppcheckTool tool{options, marks, Constants::CHECK_PROGRESS_ID};
|
||||
CppcheckTool tool{marks, Constants::CHECK_PROGRESS_ID};
|
||||
CppcheckTrigger trigger{marks, tool};
|
||||
DiagnosticsModel manualRunModel;
|
||||
CppcheckTool manualRunTool{options, manualRunModel, Constants::MANUAL_CHECK_PROGRESS_ID};
|
||||
CppcheckTool manualRunTool{manualRunModel, Constants::MANUAL_CHECK_PROGRESS_ID};
|
||||
Utils::Perspective perspective{Constants::PERSPECTIVE_ID, ::Cppcheck::Tr::tr("Cppcheck")};
|
||||
|
||||
QAction *manualRunAction;
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
CppcheckPluginPrivate::CppcheckPluginPrivate()
|
||||
{
|
||||
tool.updateOptions();
|
||||
connect(&options, &AspectContainer::changed, [this] {
|
||||
connect(&settings(), &AspectContainer::changed, [this] {
|
||||
tool.updateOptions();
|
||||
trigger.recheck();
|
||||
});
|
||||
@@ -112,7 +112,7 @@ void CppcheckPluginPrivate::startManualRun()
|
||||
|
||||
manualRunTool.updateOptions();
|
||||
|
||||
auto optionsWidget = options.layouter()().emerge();
|
||||
auto optionsWidget = settings().layouter()().emerge();
|
||||
|
||||
ManualRunDialog dialog(optionsWidget, project);
|
||||
if (dialog.exec() == ManualRunDialog::Rejected)
|
||||
|
||||
Reference in New Issue
Block a user