diff options
-rw-r--r-- | src/lib/corelib/tools/vsenvironmentdetector.cpp | 9 |
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 |