diff --git a/src/plugins/projectexplorer/msvctoolchain.cpp b/src/plugins/projectexplorer/msvctoolchain.cpp index 0ffb6c4a3dd..bd1dcf3e5e0 100644 --- a/src/plugins/projectexplorer/msvctoolchain.cpp +++ b/src/plugins/projectexplorer/msvctoolchain.cpp @@ -1149,8 +1149,8 @@ void MsvcToolChain::rescanForCompiler() Utils::Environment env = Utils::Environment::systemEnvironment(); addToEnvironment(env); - m_compilerCommand - = env.searchInPath(QLatin1String("cl.exe"), {}, [](const Utils::FilePath &name) { + setCompilerCommand( + env.searchInPath(QLatin1String("cl.exe"), {}, [](const Utils::FilePath &name) { QDir dir(QDir::cleanPath(name.toFileInfo().absolutePath() + QStringLiteral("/.."))); do { if (QFile::exists(dir.absoluteFilePath(QStringLiteral("vcvarsall.bat"))) @@ -1158,7 +1158,7 @@ void MsvcToolChain::rescanForCompiler() return true; } while (dir.cdUp() && !dir.isRoot()); return false; - }); + })); } QList MsvcToolChain::createOutputParsers() const diff --git a/src/plugins/projectexplorer/msvctoolchain.h b/src/plugins/projectexplorer/msvctoolchain.h index 20880a7c351..4e711183adb 100644 --- a/src/plugins/projectexplorer/msvctoolchain.h +++ b/src/plugins/projectexplorer/msvctoolchain.h @@ -152,8 +152,6 @@ private: mutable Utils::Environment m_lastEnvironment; // Last checked 'incoming' environment. mutable Utils::Environment m_resultEnvironment; // Resulting environment for VC - Utils::FilePath m_compilerCommand; - protected: QString m_vcvarsBat; QString m_varsBatArg; // Argument