aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/tools/vsenvironmentdetector.cpp
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2017-10-11 14:14:34 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2017-10-12 11:09:33 +0000
commit81070285791c8a0525d609272a512f4ac5049cb1 (patch)
tree6068065ac835a9893ca5c816be134906fe037b25 /src/lib/corelib/tools/vsenvironmentdetector.cpp
parent5c6a2d8b49c792b7a83da2c81c1411ad9df3ba2b (diff)
Fix return value of VsEnvironmentDetector::start
This function always returned true. Instead, it should return false if all detection attempts failed. Change-Id: I9bf15f6b4f4448570e362dd232e1cdd7dc244760 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/lib/corelib/tools/vsenvironmentdetector.cpp')
-rw-r--r--src/lib/corelib/tools/vsenvironmentdetector.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/corelib/tools/vsenvironmentdetector.cpp b/src/lib/corelib/tools/vsenvironmentdetector.cpp
index 074f0cbf3..c8a638130 100644
--- a/src/lib/corelib/tools/vsenvironmentdetector.cpp
+++ b/src/lib/corelib/tools/vsenvironmentdetector.cpp
@@ -85,18 +85,21 @@ bool VsEnvironmentDetector::start(std::vector<MSVC *> msvcs)
std::vector<MSVC *> compatibleMSVCs;
QString lastVcInstallPath;
+ bool someMSVCDetected = false;
for (MSVC * const msvc : msvcs) {
if (lastVcInstallPath != msvc->vcInstallPath) {
lastVcInstallPath = msvc->vcInstallPath;
if (!compatibleMSVCs.empty()) {
- startDetection(compatibleMSVCs);
+ if (startDetection(compatibleMSVCs))
+ someMSVCDetected = true;
compatibleMSVCs.clear();
}
}
compatibleMSVCs.push_back(msvc);
}
- startDetection(compatibleMSVCs);
- return true;
+ if (startDetection(compatibleMSVCs))
+ someMSVCDetected = true;
+ return someMSVCDetected;
}
QString VsEnvironmentDetector::findVcVarsAllBat(const MSVC &msvc) const