aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFawzi Mohamed <fawzi.mohamed@digia.com>2014-04-01 18:40:56 +0200
committerFawzi Mohamed <fawzi.mohamed@digia.com>2014-04-01 19:55:04 +0200
commit415602e04d11d9944ecc363f4eab53c51a68b631 (patch)
tree9a9060e2b415df1aef7b70a1731414b80f13d48f
parent34d1826263c07438a44b1b3cabe4a8a491102ee2 (diff)
iosrunconfiguration: always update dev type switcher
Change-Id: I9c9956f20b33274f193fc69639ed7461ba96ff9f Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
-rw-r--r--src/plugins/ios/iosrunconfiguration.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/ios/iosrunconfiguration.cpp b/src/plugins/ios/iosrunconfiguration.cpp
index 780d8a7240..0eae80b072 100644
--- a/src/plugins/ios/iosrunconfiguration.cpp
+++ b/src/plugins/ios/iosrunconfiguration.cpp
@@ -101,10 +101,7 @@ void IosRunConfiguration::init()
m_parseInProgress = project->parseInProgress(m_profilePath);
m_lastIsEnabled = isEnabled();
m_lastDisabledReason = disabledReason();
- if (DeviceTypeKitInformation::deviceTypeId(target()->kit()) == Constants::IOS_DEVICE_TYPE)
- m_deviceType = IosDeviceType::IosDevice;
- else
- m_deviceType = IosDeviceType::SimulatedIphoneRetina4Inch;
+ m_deviceType = IosDeviceType::IosDevice;
updateDisplayNames();
connect(DeviceManager::instance(), SIGNAL(updated()),
SLOT(deviceChanges()));
@@ -161,6 +158,10 @@ QStringList IosRunConfiguration::commandLineArguments()
void IosRunConfiguration::updateDisplayNames()
{
+ if (DeviceTypeKitInformation::deviceTypeId(target()->kit()) == Constants::IOS_DEVICE_TYPE)
+ m_deviceType = IosDeviceType::IosDevice;
+ else if (m_deviceType == IosDeviceType::IosDevice)
+ m_deviceType = IosDeviceType::SimulatedIphoneRetina4Inch;
ProjectExplorer::IDevice::ConstPtr dev =
ProjectExplorer::DeviceKitInformation::device(target()->kit());
const QString devName = dev.isNull() ? IosDevice::name() : dev->displayName();
@@ -370,10 +371,6 @@ IosRunConfigurationWidget::IosRunConfigurationWidget(IosRunConfiguration *runCon
m_ui(new Ui::IosRunConfiguration), m_runConfiguration(runConfiguration)
{
m_ui->setupUi(this);
- if (m_runConfiguration->deviceType() == IosDeviceType::IosDevice) {
- m_ui->deviceTypeLabel->setVisible(false);
- m_ui->deviceTypeComboBox->setVisible(false);
- }
updateValues();
connect(m_ui->deviceTypeComboBox, SIGNAL(currentIndexChanged(int)),
@@ -447,6 +444,9 @@ void IosRunConfigurationWidget::setDeviceTypeIndex(int devIndex)
void IosRunConfigurationWidget::updateValues()
{
+ bool showDeviceSelector = m_runConfiguration->deviceType() != IosDeviceType::IosDevice;
+ m_ui->deviceTypeLabel->setVisible(showDeviceSelector);
+ m_ui->deviceTypeComboBox->setVisible(showDeviceSelector);
QStringList args = m_runConfiguration->commandLineArguments();
QString argsString = argListToString(args);