forked from qt-creator/qt-creator
ios: cache app path in deploy step
avoid accessing target and runconfig in the run method Change-Id: I2d48ade1313d80e8041ea90f59f53f93858ab6b3 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -86,6 +86,10 @@ bool IosDeployStep::init()
|
|||||||
{
|
{
|
||||||
QTC_CHECK(m_transferStatus == NoTransfer);
|
QTC_CHECK(m_transferStatus == NoTransfer);
|
||||||
m_device = ProjectExplorer::DeviceKitInformation::device(target()->kit());
|
m_device = ProjectExplorer::DeviceKitInformation::device(target()->kit());
|
||||||
|
IosRunConfiguration * runConfig = qobject_cast<IosRunConfiguration *>(
|
||||||
|
this->target()->activeRunConfiguration());
|
||||||
|
QTC_CHECK(runConfig);
|
||||||
|
m_bundlePath = runConfig->bundleDir().toString();
|
||||||
if (m_device.isNull()) {
|
if (m_device.isNull()) {
|
||||||
emit addOutput(tr("Error: no device available, deploy failed."),
|
emit addOutput(tr("Error: no device available, deploy failed."),
|
||||||
BuildStep::ErrorMessageOutput);
|
BuildStep::ErrorMessageOutput);
|
||||||
@@ -219,9 +223,7 @@ QString IosDeployStep::deviceId() const
|
|||||||
|
|
||||||
QString IosDeployStep::appBundle() const
|
QString IosDeployStep::appBundle() const
|
||||||
{
|
{
|
||||||
IosRunConfiguration * runConfig = qobject_cast<IosRunConfiguration *>(
|
return m_bundlePath;
|
||||||
this->target()->activeRunConfiguration());
|
|
||||||
return runConfig->bundleDir().toString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void IosDeployStep::raiseError(const QString &errorString)
|
void IosDeployStep::raiseError(const QString &errorString)
|
||||||
|
@@ -108,6 +108,7 @@ private:
|
|||||||
IosToolHandler *m_toolHandler;
|
IosToolHandler *m_toolHandler;
|
||||||
QFutureInterface<bool> m_futureInterface;
|
QFutureInterface<bool> m_futureInterface;
|
||||||
ProjectExplorer::IDevice::ConstPtr m_device;
|
ProjectExplorer::IDevice::ConstPtr m_device;
|
||||||
|
QString m_bundlePath;
|
||||||
static const Core::Id Id;
|
static const Core::Id Id;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user