ProjectExplorer: Store parts of active build config in runcontrol

... on runcontrol creation to prevent later access. Adapt some users.
There are more to come.

Change-Id: I2a3fe5eea0ada4eff7d08b79a6f49694e6962c8a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2019-08-30 12:00:57 +02:00
parent bef986f3fd
commit bcaeb73e68
6 changed files with 32 additions and 13 deletions

View File

@@ -136,11 +136,7 @@ private:
Target *target = runControl()->target();
QTC_ASSERT(target, reportFailure(); return);
BuildConfiguration::BuildType buildType = BuildConfiguration::Unknown;
if (const BuildConfiguration *buildConfig = target->activeBuildConfiguration())
buildType = buildConfig->buildType();
if (buildType == BuildConfiguration::Release) {
if (runControl()->buildType() == BuildConfiguration::Release) {
const QString wrongMode = ClangToolRunWorker::tr("Release");
const QString toolName = tool()->name();
const QString title = ClangToolRunWorker::tr("Run %1 in %2 Mode?").arg(toolName, wrongMode);