forked from qt-creator/qt-creator
CppCheck: Move to simpler setLayouter calls
Change-Id: Id0e9f1adfe730f6067ade9472db597e3a12fc2e3 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -108,11 +108,11 @@ CppcheckOptions::CppcheckOptions()
|
|||||||
readSettings();
|
readSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::function<void(QWidget *widget)> CppcheckOptions::layouter()
|
std::function<Layouting::LayoutItem()> CppcheckOptions::layouter()
|
||||||
{
|
{
|
||||||
return [this](QWidget *widget) {
|
return [this] {
|
||||||
using namespace Layouting;
|
using namespace Layouting;
|
||||||
Form {
|
return Form {
|
||||||
binary, br,
|
binary, br,
|
||||||
Tr::tr("Checks:"), Flow {
|
Tr::tr("Checks:"), Flow {
|
||||||
warning,
|
warning,
|
||||||
@@ -132,7 +132,7 @@ std::function<void(QWidget *widget)> CppcheckOptions::layouter()
|
|||||||
addIncludePaths,
|
addIncludePaths,
|
||||||
guessArguments
|
guessArguments
|
||||||
}
|
}
|
||||||
}.attachTo(widget);
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ class CppcheckOptions final : public Core::PagedSettings
|
|||||||
public:
|
public:
|
||||||
CppcheckOptions();
|
CppcheckOptions();
|
||||||
|
|
||||||
std::function<void(QWidget *widget)> layouter();
|
std::function<Layouting::LayoutItem()> layouter();
|
||||||
|
|
||||||
Utils::FilePathAspect binary{this};
|
Utils::FilePathAspect binary{this};
|
||||||
Utils::BoolAspect warning{this};
|
Utils::BoolAspect warning{this};
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
#include <debugger/analyzer/analyzerconstants.h>
|
#include <debugger/analyzer/analyzerconstants.h>
|
||||||
#include <debugger/debuggermainwindow.h>
|
#include <debugger/debuggermainwindow.h>
|
||||||
|
|
||||||
|
#include <utils/layoutbuilder.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <utils/utilsicons.h>
|
#include <utils/utilsicons.h>
|
||||||
|
|
||||||
@@ -111,8 +112,7 @@ void CppcheckPluginPrivate::startManualRun()
|
|||||||
|
|
||||||
manualRunTool.updateOptions();
|
manualRunTool.updateOptions();
|
||||||
|
|
||||||
auto optionsWidget = new QWidget;
|
auto optionsWidget = options.layouter()().emerge();
|
||||||
options.layouter()(optionsWidget);
|
|
||||||
|
|
||||||
ManualRunDialog dialog(optionsWidget, project);
|
ManualRunDialog dialog(optionsWidget, project);
|
||||||
if (dialog.exec() == ManualRunDialog::Rejected)
|
if (dialog.exec() == ManualRunDialog::Rejected)
|
||||||
|
|||||||
Reference in New Issue
Block a user