aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppcheck
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2023-08-17 12:51:13 +0200
committerhjk <hjk@qt.io>2023-08-17 11:58:41 +0000
commitec7abcf98c5915364cd354d8ee62c645bcdd3a8d (patch)
tree2d7c7c8eb864b979d4b940d51364e8f2b35d6cf0 /src/plugins/cppcheck
parent3fa4fa5cf331b81a12fedcf67514094c741f3bf0 (diff)
Utils: Make FilePathAspect::setDefaultValue take a QString
This sets the unexpanded value, so going to a "cooked" FilePath can at least theoretically break. On the user side it saves a roundtrip in a few cases, but is more ugly when the input is already a proper FilePath. Change-Id: I8a7e8f6d46fcc34c96b55e41d656dca933fbef4e Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Diffstat (limited to 'src/plugins/cppcheck')
-rw-r--r--src/plugins/cppcheck/cppchecksettings.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/cppcheck/cppchecksettings.cpp b/src/plugins/cppcheck/cppchecksettings.cpp
index 926a8f9813b..142d3ac236f 100644
--- a/src/plugins/cppcheck/cppchecksettings.cpp
+++ b/src/plugins/cppcheck/cppchecksettings.cpp
@@ -44,10 +44,10 @@ CppcheckSettings::CppcheckSettings()
if (HostOsInfo::isAnyUnixHost()) {
binary.setDefaultValue("cppcheck");
} else {
- FilePath programFiles = FilePath::fromUserInput(qtcEnvironmentVariable("PROGRAMFILES"));
+ QString programFiles = qtcEnvironmentVariable("PROGRAMFILES");
if (programFiles.isEmpty())
programFiles = "C:/Program Files";
- binary.setDefaultValue(programFiles.pathAppended("Cppcheck/cppcheck.exe"));
+ binary.setDefaultValue(programFiles + "/Cppcheck/cppcheck.exe");
}
warning.setSettingsKey("warning");