aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/tools/clangclinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/corelib/tools/clangclinfo.cpp')
-rw-r--r--src/lib/corelib/tools/clangclinfo.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/corelib/tools/clangclinfo.cpp b/src/lib/corelib/tools/clangclinfo.cpp
index a9a1cb449..fd907ebf1 100644
--- a/src/lib/corelib/tools/clangclinfo.cpp
+++ b/src/lib/corelib/tools/clangclinfo.cpp
@@ -47,7 +47,7 @@ static std::vector<MSVCInstallInfo> compatibleMsvcs(Logger &logger)
return true;
bool ok = false;
const int major = versions.at(0).toInt(&ok);
- return !(ok && major >= 15); // support MSVC2017 and above
+ return !ok || major < 15; // support MSVC2017 and above
};
Internal::removeIf(msvcs, filter);
for (const auto &msvc: msvcs) {
@@ -61,7 +61,7 @@ static std::vector<MSVCInstallInfo> compatibleMsvcs(Logger &logger)
static QString findCompatibleVcsarsallBat(const std::vector<MSVCInstallInfo> &msvcs)
{
for (const auto &msvc: msvcs) {
- const auto vcvarsallPath = msvc.findVcvarsallBat();
+ auto vcvarsallPath = msvc.findVcvarsallBat();
if (!vcvarsallPath.isEmpty())
return vcvarsallPath;
}
@@ -121,7 +121,7 @@ std::vector<ClangClInfo> ClangClInfo::installedCompilers(
if (registry.contains(key)) {
const auto compilerPath = QDir::fromNativeSeparators(registry.value(key).toString())
+ QStringLiteral("/bin/") + compilerName;
- if (QFileInfo::exists(compilerPath))
+ if (QFileInfo::exists(compilerPath) && !contains(compilerPaths, compilerPath))
compilerPaths.push_back(compilerPath);
}