aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-08-10 12:10:35 +0200
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-08-10 12:19:45 +0200
commitd78d7dbce3d4a85e7f111db719dde0b943814575 (patch)
tree4002d66f80e4165734e59437ca4eefba0e9d684f
parentfb550c4ff1d29126fcc3c0390d7768c41b33c573 (diff)
Fix running applications in Windows SDK 7.1.v2.3.0-rc
Fix start of applications with varying Qt-versions when Qt Creator is launched from an Windows SDK command prompt (prevent PATH from being reset by setenv.cmd). Change-Id: I74f75f3663be4836c368a4b9d8c7f8fc5ec351d7 Reviewed-on: http://codereview.qt.nokia.com/2818 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
-rw-r--r--src/plugins/projectexplorer/msvctoolchain.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/projectexplorer/msvctoolchain.cpp b/src/plugins/projectexplorer/msvctoolchain.cpp
index 9cf2ea8948..6eda22eebe 100644
--- a/src/plugins/projectexplorer/msvctoolchain.cpp
+++ b/src/plugins/projectexplorer/msvctoolchain.cpp
@@ -260,7 +260,7 @@ static QString winExpandDelayedEnvReferences(QString in, const Utils::Environmen
static Utils::Environment msvcReadEnvironmentSetting(const QString &varsBat,
const QString &args,
- const Utils::Environment &env)
+ Utils::Environment env)
{
// Run the setup script and extract the variables
Utils::Environment result = env;
@@ -286,6 +286,10 @@ static Utils::Environment msvcReadEnvironmentSetting(const QString &varsBat,
}
Utils::QtcProcess run;
+ // As of WinSDK 7.1, there is logic preventing the path from being set
+ // correctly if "ORIGINALPATH" is already set. That can cause problems
+ // if Creator is launched within a session set up by setenv.cmd.
+ env.unset(QLatin1String("ORIGINALPATH"));
run.setEnvironment(env);
const QString cmdPath = QString::fromLocal8Bit(qgetenv("COMSPEC"));
// Windows SDK setup scripts require command line switches for environment expansion.