Skip to content
Snippets Groups Projects
Commit c4ab8909 authored by Fawzi Mohamed's avatar Fawzi Mohamed
Browse files

ios: cache app path in deploy step


avoid accessing target and runconfig in the run
method

Change-Id: I2d48ade1313d80e8041ea90f59f53f93858ab6b3
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent 30caf88a
No related branches found
No related tags found
No related merge requests found
......@@ -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;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment