summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFawzi Mohamed <fawzi.mohamed@digia.com>2014-12-01 11:44:14 +0100
committerFawzi Mohamed <fawzi.mohamed@theqtcompany.com>2014-12-02 13:36:43 +0100
commite8ea09cc32d0f07b5bdada2f4d5e5ddd7a3ceae0 (patch)
tree53943b27601073a8223173ac9fac620c5bc5571a
parent057a26e9c39326b681dda08b4abda1bbade81329 (diff)
downloadqt-creator-e8ea09cc32d0f07b5bdada2f4d5e5ddd7a3ceae0.tar.gz
iOS: do not set simulator type before initial setup
The run configuration did try to set the simulator type for devices, and also before knowing the available simulators. Make most IosDeviceType initialisations explicit about the device type. Change-Id: I22b87bf4568e1af0c12b1fb91d3074bf29438db2 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
-rw-r--r--src/plugins/ios/iosdeploystep.cpp2
-rw-r--r--src/plugins/ios/iosdevice.cpp2
-rw-r--r--src/plugins/ios/iosrunconfiguration.cpp8
3 files changed, 7 insertions, 5 deletions
diff --git a/src/plugins/ios/iosdeploystep.cpp b/src/plugins/ios/iosdeploystep.cpp
index d0a24cd10d..446e3df0d7 100644
--- a/src/plugins/ios/iosdeploystep.cpp
+++ b/src/plugins/ios/iosdeploystep.cpp
@@ -134,7 +134,7 @@ void IosDeployStep::run(QFutureInterface<bool> &fi)
}
m_transferStatus = TransferInProgress;
QTC_CHECK(m_toolHandler == 0);
- m_toolHandler = new IosToolHandler(IosDeviceType(), this);
+ m_toolHandler = new IosToolHandler(IosDeviceType(IosDeviceType::IosDevice), this);
m_futureInterface.setProgressRange(0, 200);
m_futureInterface.setProgressValueAndText(0, QLatin1String("Transferring application"));
m_futureInterface.reportStarted();
diff --git a/src/plugins/ios/iosdevice.cpp b/src/plugins/ios/iosdevice.cpp
index 59667f2d3b..a547fd0eb5 100644
--- a/src/plugins/ios/iosdevice.cpp
+++ b/src/plugins/ios/iosdevice.cpp
@@ -292,7 +292,7 @@ void IosDeviceManager::deviceDisconnected(const QString &uid)
void IosDeviceManager::updateInfo(const QString &devId)
{
- IosToolHandler *requester = new IosToolHandler(IosDeviceType(), this);
+ IosToolHandler *requester = new IosToolHandler(IosDeviceType(IosDeviceType::IosDevice), this);
connect(requester, SIGNAL(deviceInfo(Ios::IosToolHandler*,QString,Ios::IosToolHandler::Dict)),
SLOT(deviceInfo(Ios::IosToolHandler*,QString,Ios::IosToolHandler::Dict)), Qt::QueuedConnection);
connect(requester, SIGNAL(finished(Ios::IosToolHandler*)),
diff --git a/src/plugins/ios/iosrunconfiguration.cpp b/src/plugins/ios/iosrunconfiguration.cpp
index 22231a529b..dff575cd99 100644
--- a/src/plugins/ios/iosrunconfiguration.cpp
+++ b/src/plugins/ios/iosrunconfiguration.cpp
@@ -162,7 +162,7 @@ QStringList IosRunConfiguration::commandLineArguments()
void IosRunConfiguration::updateDisplayNames()
{
if (DeviceTypeKitInformation::deviceTypeId(target()->kit()) == Constants::IOS_DEVICE_TYPE)
- m_deviceType = IosDeviceType();
+ m_deviceType = IosDeviceType(IosDeviceType::IosDevice);
else if (m_deviceType.type == IosDeviceType::IosDevice)
m_deviceType = IosDeviceType(IosDeviceType::SimulatedDevice);
IDevice::ConstPtr dev = DeviceKitInformation::device(target()->kit());
@@ -474,8 +474,10 @@ void IosRunConfigurationWidget::updateValues()
QString argsString = argListToString(args);
IosDeviceType currentDType = m_runConfiguration->deviceType();
- if (!m_ui->deviceTypeComboBox->currentData().isValid()
- || currentDType != m_ui->deviceTypeComboBox->currentData().value<IosDeviceType>()) {
+ if (currentDType.type == IosDeviceType::SimulatedDevice && !currentDType.identifier.isEmpty()
+ && (!m_ui->deviceTypeComboBox->currentData().isValid()
+ || currentDType != m_ui->deviceTypeComboBox->currentData().value<IosDeviceType>()))
+ {
bool didSet = false;
for (int i = 0; m_deviceTypeModel.hasIndex(i, 0); ++i) {
QVariant vData = m_deviceTypeModel.data(m_deviceTypeModel.index(i, 0), Qt::UserRole + 1);