summaryrefslogtreecommitdiff
path: root/src/plugins/ios
diff options
context:
space:
mode:
authorFawzi Mohamed <fawzi.mohamed@digia.com>2013-11-28 14:32:43 +0100
committerFawzi Mohamed <fawzi.mohamed@digia.com>2013-11-28 19:13:05 +0100
commit4bd0fcbf8d9777347448dc5d898a8ca27c007d89 (patch)
tree79414957779bd9b9c3afd90bcfd4aaa95c494243 /src/plugins/ios
parent1287fcaa76563e733d504556e313840f67ae1c32 (diff)
downloadqt-creator-4bd0fcbf8d9777347448dc5d898a8ca27c007d89.tar.gz
ios: emit deploysetep::finished
iosdeploystep did call reportFinished on the future interface. This is incorrect, the finished signal should be emitted instead This lead to a reuse of the future due to missing call to buildStepFinishedAsync which lead to failing on the second run of the deploy step. Change-Id: I96b8874bc98c77453d5c0af96c818dff6e955167 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Diffstat (limited to 'src/plugins/ios')
-rw-r--r--src/plugins/ios/iosdeploystep.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/plugins/ios/iosdeploystep.cpp b/src/plugins/ios/iosdeploystep.cpp
index 35a8d7bc6d..37baafeea6 100644
--- a/src/plugins/ios/iosdeploystep.cpp
+++ b/src/plugins/ios/iosdeploystep.cpp
@@ -75,6 +75,7 @@ IosDeployStep::~IosDeployStep() { }
void IosDeployStep::ctor()
{
+ m_toolHandler = 0;
m_transferStatus = NoTransfer;
m_device = ProjectExplorer::DeviceKitInformation::device(target()->kit());
const QString devName = m_device.isNull() ? IosDevice::name() : m_device->displayName();
@@ -103,23 +104,24 @@ void IosDeployStep::run(QFutureInterface<bool> &fi)
ProjectExplorer::Constants::TASK_CATEGORY_DEPLOYMENT);
m_futureInterface.reportResult(!iossimulator().isNull());
cleanup();
- m_futureInterface.reportFinished();
+ emit finished();
return;
}
m_transferStatus = TransferInProgress;
- IosToolHandler *toolHandler = new IosToolHandler(IosToolHandler::IosDeviceType, this);
+ QTC_CHECK(m_toolHandler == 0);
+ m_toolHandler = new IosToolHandler(IosToolHandler::IosDeviceType, this);
m_futureInterface.setProgressRange(0, 200);
m_futureInterface.setProgressValueAndText(0, QLatin1String("Transferring application"));
m_futureInterface.reportStarted();
- connect(toolHandler, SIGNAL(isTransferringApp(Ios::IosToolHandler*,QString,QString,int,int,QString)),
+ connect(m_toolHandler, SIGNAL(isTransferringApp(Ios::IosToolHandler*,QString,QString,int,int,QString)),
SLOT(handleIsTransferringApp(Ios::IosToolHandler*,QString,QString,int,int,QString)));
- connect(toolHandler, SIGNAL(didTransferApp(Ios::IosToolHandler*,QString,QString,Ios::IosToolHandler::OpStatus)),
+ connect(m_toolHandler, SIGNAL(didTransferApp(Ios::IosToolHandler*,QString,QString,Ios::IosToolHandler::OpStatus)),
SLOT(handleDidTransferApp(Ios::IosToolHandler*,QString,QString,Ios::IosToolHandler::OpStatus)));
- connect(toolHandler, SIGNAL(finished(Ios::IosToolHandler*)),
+ connect(m_toolHandler, SIGNAL(finished(Ios::IosToolHandler*)),
SLOT(handleFinished(Ios::IosToolHandler*)));
- connect(toolHandler, SIGNAL(errorMsg(Ios::IosToolHandler*,QString)),
+ connect(m_toolHandler, SIGNAL(errorMsg(Ios::IosToolHandler*,QString)),
SLOT(handleErrorMsg(Ios::IosToolHandler*,QString)));
- toolHandler->requestTransferApp(appBundle(), deviceId());
+ m_toolHandler->requestTransferApp(appBundle(), deviceId());
}
void IosDeployStep::cancel()
@@ -179,7 +181,7 @@ void IosDeployStep::handleFinished(IosToolHandler *handler)
cleanup();
handler->deleteLater();
// move it when result is reported? (would need care to avoid problems with concurrent runs)
- m_futureInterface.reportFinished();
+ emit finished();
}
void IosDeployStep::handleErrorMsg(IosToolHandler *handler, const QString &msg)