forked from qt-creator/qt-creator
ProjectExplorer: Replace RunControl::buildTargetInfo
... by two accessors to the only used field. General idea here is to make the presence of a RunConfiguration in a RunControl less prominent to be able to remove it at some time completely, as the configuration's data might change while the control is running. Change-Id: I752540fadd135d6904fc9bf4e3506be074b0c003 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -891,9 +891,14 @@ QString RunControl::buildKey() const
|
|||||||
return d->runConfiguration ? d->runConfiguration->buildKey() : QString();
|
return d->runConfiguration ? d->runConfiguration->buildKey() : QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
BuildTargetInfo RunControl::buildTargetInfo() const
|
FilePath RunControl::targetFilePath() const
|
||||||
{
|
{
|
||||||
return d->runConfiguration->buildTargetInfo();
|
return d->runConfiguration->buildTargetInfo().targetFilePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
FilePath RunControl::projectFilePath() const
|
||||||
|
{
|
||||||
|
return d->runConfiguration->buildTargetInfo().projectFilePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|||||||
@@ -26,7 +26,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "applicationlauncher.h"
|
#include "applicationlauncher.h"
|
||||||
#include "buildtargetinfo.h"
|
|
||||||
#include "devicesupport/idevice.h"
|
#include "devicesupport/idevice.h"
|
||||||
#include "projectexplorerconstants.h"
|
#include "projectexplorerconstants.h"
|
||||||
#include "runconfiguration.h"
|
#include "runconfiguration.h"
|
||||||
@@ -245,7 +244,9 @@ public:
|
|||||||
|
|
||||||
ISettingsAspect *settings(Core::Id id) const;
|
ISettingsAspect *settings(Core::Id id) const;
|
||||||
QString buildKey() const;
|
QString buildKey() const;
|
||||||
BuildTargetInfo buildTargetInfo() const;
|
|
||||||
|
Utils::FilePath targetFilePath() const;
|
||||||
|
Utils::FilePath projectFilePath() const;
|
||||||
|
|
||||||
Utils::OutputFormatter *outputFormatter() const;
|
Utils::OutputFormatter *outputFormatter() const;
|
||||||
Core::Id runMode() const;
|
Core::Id runMode() const;
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ WinRtDebugSupport::WinRtDebugSupport(RunControl *runControl)
|
|||||||
setQmlServer(qmlServer);
|
setQmlServer(qmlServer);
|
||||||
}
|
}
|
||||||
|
|
||||||
setSymbolFile(runControl->buildTargetInfo().targetFilePath);
|
setSymbolFile(runControl->targetFilePath());
|
||||||
QString errorMessage;
|
QString errorMessage;
|
||||||
m_runner = new WinRtRunnerHelper(this, &errorMessage);
|
m_runner = new WinRtRunnerHelper(this, &errorMessage);
|
||||||
if (!errorMessage.isEmpty()) {
|
if (!errorMessage.isEmpty()) {
|
||||||
|
|||||||
@@ -69,12 +69,11 @@ WinRtRunnerHelper::WinRtRunnerHelper(ProjectExplorer::RunWorker *runWorker, QStr
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const BuildTargetInfo bti = runControl->buildTargetInfo();
|
m_executableFilePath = runControl->targetFilePath().toString();
|
||||||
m_executableFilePath = bti.targetFilePath.toString();
|
|
||||||
|
|
||||||
if (m_executableFilePath.isEmpty()) {
|
if (m_executableFilePath.isEmpty()) {
|
||||||
*errorMessage = tr("Cannot determine the executable file path for \"%1\".").arg(
|
*errorMessage = tr("Cannot determine the executable file path for \"%1\".")
|
||||||
QDir::toNativeSeparators(bti.projectFilePath.toString()));
|
.arg(runControl->projectFilePath().toUserOutput());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user