aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppcheck
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2023-05-17 17:18:11 +0200
committerhjk <hjk@qt.io>2023-05-19 15:07:17 +0000
commit6f31d874441050738e83af8dad920b178fc6998b (patch)
treea7954e147f2ebb175d5b833bb6dec7cde864bd6c /src/plugins/cppcheck
parent2274847bfe517ec4889b01fd5eaef11b9161bfe0 (diff)
Use more FilePathAspect
Change-Id: Ib348df1460f8610607251498b07010df58d51ddf Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Diffstat (limited to 'src/plugins/cppcheck')
-rw-r--r--src/plugins/cppcheck/cppcheckoptions.cpp1
-rw-r--r--src/plugins/cppcheck/cppcheckoptions.h2
-rw-r--r--src/plugins/cppcheck/cppchecktool.cpp2
3 files changed, 2 insertions, 3 deletions
diff --git a/src/plugins/cppcheck/cppcheckoptions.cpp b/src/plugins/cppcheck/cppcheckoptions.cpp
index 37f537f2fe..22f728f8f1 100644
--- a/src/plugins/cppcheck/cppcheckoptions.cpp
+++ b/src/plugins/cppcheck/cppcheckoptions.cpp
@@ -36,7 +36,6 @@ CppcheckOptions::CppcheckOptions()
registerAspect(&binary);
binary.setSettingsKey("binary");
- binary.setDisplayStyle(StringAspect::PathChooserDisplay);
binary.setExpectedKind(PathChooser::ExistingCommand);
binary.setCommandVersionArguments({"--version"});
binary.setLabelText(Tr::tr("Binary:"));
diff --git a/src/plugins/cppcheck/cppcheckoptions.h b/src/plugins/cppcheck/cppcheckoptions.h
index 84fbf483bb..5a617b1241 100644
--- a/src/plugins/cppcheck/cppcheckoptions.h
+++ b/src/plugins/cppcheck/cppcheckoptions.h
@@ -17,7 +17,7 @@ public:
std::function<void(QWidget *widget)> layouter();
- Utils::StringAspect binary;
+ Utils::FilePathAspect binary;
Utils::BoolAspect warning;
Utils::BoolAspect style;
Utils::BoolAspect performance;
diff --git a/src/plugins/cppcheck/cppchecktool.cpp b/src/plugins/cppcheck/cppchecktool.cpp
index bd44957c37..cd824b3db4 100644
--- a/src/plugins/cppcheck/cppchecktool.cpp
+++ b/src/plugins/cppcheck/cppchecktool.cpp
@@ -100,7 +100,7 @@ void CppcheckTool::updateArguments()
arguments.push_back("--template=\"{file},{line},{severity},{id},{message}\"");
- m_runner->reconfigure(m_options.binary.filePath(), arguments.join(' '));
+ m_runner->reconfigure(m_options.binary(), arguments.join(' '));
}
QStringList CppcheckTool::additionalArguments(const CppEditor::ProjectPart &part) const