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);
|
||||
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()) {
|
||||
emit addOutput(tr("Error: no device available, deploy failed."),
|
||||
BuildStep::ErrorMessageOutput);
|
||||
@@ -219,9 +223,7 @@ QString IosDeployStep::deviceId() const
|
||||
|
||||
QString IosDeployStep::appBundle() const
|
||||
{
|
||||
IosRunConfiguration * runConfig = qobject_cast<IosRunConfiguration *>(
|
||||
this->target()->activeRunConfiguration());
|
||||
return runConfig->bundleDir().toString();
|
||||
return m_bundlePath;
|
||||
}
|
||||
|
||||
void IosDeployStep::raiseError(const QString &errorString)
|
||||
|
@@ -108,6 +108,7 @@ private:
|
||||
IosToolHandler *m_toolHandler;
|
||||
QFutureInterface<bool> m_futureInterface;
|
||||
ProjectExplorer::IDevice::ConstPtr m_device;
|
||||
QString m_bundlePath;
|
||||
static const Core::Id Id;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user