summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Schulz <david.schulz@qt.io>2018-07-24 14:02:01 +0200
committerDavid Schulz <david.schulz@qt.io>2018-07-25 08:47:58 +0000
commit8fb73bb27817a584ad1b7861da9228c6e22bf193 (patch)
tree0b4596551f62a4ba587f0e243e89082768e4547e
parentd1b77f2c79b23ca055c6fb2d04b1bcf1353073ec (diff)
downloadqt-creator-8fb73bb27817a584ad1b7861da9228c6e22bf193.tar.gz
ProjectExplorer: fix msvc toolchain detection for Windows SDK 7.x
Cancel processing the environment diff only if the setenv scripts return a non zero exit code. Just checking the presence of standard error output seems to be a to aggressive error checking in this case. Task-number: QTCREATORBUG-18328 Change-Id: I9243932cd5721cfbfec5a980a2fab6e69f4c31c7 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
-rw-r--r--src/plugins/projectexplorer/abstractmsvctoolchain.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/plugins/projectexplorer/abstractmsvctoolchain.cpp b/src/plugins/projectexplorer/abstractmsvctoolchain.cpp
index c47c0b4307..195f430d70 100644
--- a/src/plugins/projectexplorer/abstractmsvctoolchain.cpp
+++ b/src/plugins/projectexplorer/abstractmsvctoolchain.cpp
@@ -367,16 +367,12 @@ Utils::optional<QString> AbstractMsvcToolChain::generateEnvironmentSettings(cons
run.setCodec(QTextCodec::codecForName("UTF-8"));
Utils::SynchronousProcessResponse response = run.runBlocking(cmdPath.toString(), cmdArguments);
- QString command = QDir::toNativeSeparators(batchFile);
- if (!response.stdErr().isEmpty()) {
- return QCoreApplication::translate("ProjectExplorer::Internal::AbstractMsvcToolChain",
- "Failed to retrieve MSVC Environment from \"%1\":\n"
- "%2").arg(command, response.stdErr());
- }
-
if (response.result != Utils::SynchronousProcessResponse::Finished) {
- const QString message = response.exitMessage(cmdPath.toString(), 10);
+ const QString message = !response.stdErr().isEmpty()
+ ? response.stdErr()
+ : response.exitMessage(cmdPath.toString(), 10);
qWarning().noquote() << message;
+ QString command = QDir::toNativeSeparators(batchFile);
if (!batchArgs.isEmpty())
command += ' ' + batchArgs;
return QCoreApplication::translate("ProjectExplorer::Internal::AbstractMsvcToolChain",