Commit 3cd64380 authored by Fawzi Mohamed's avatar Fawzi Mohamed
Browse files

ios: correctly update run configuration names



Change-Id: I46ea3e273f7e0e9a015c867a2bec261006bec117
Reviewed-by: default avatarLeena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: default avatarFawzi Mohamed <fawzi.mohamed@digia.com>
parent 2564231f
...@@ -100,6 +100,7 @@ void IosRunConfiguration::init() ...@@ -100,6 +100,7 @@ void IosRunConfiguration::init()
m_parseInProgress = project->parseInProgress(m_profilePath); m_parseInProgress = project->parseInProgress(m_profilePath);
m_lastIsEnabled = isEnabled(); m_lastIsEnabled = isEnabled();
m_lastDisabledReason = disabledReason(); m_lastDisabledReason = disabledReason();
updateDisplayNames();
connect(DeviceManager::instance(), SIGNAL(updated()), connect(DeviceManager::instance(), SIGNAL(updated()),
SLOT(deviceChanges())); SLOT(deviceChanges()));
connect(KitManager::instance(), SIGNAL(kitsChanged()), connect(KitManager::instance(), SIGNAL(kitsChanged()),
...@@ -120,7 +121,7 @@ void IosRunConfiguration::enabledCheck() ...@@ -120,7 +121,7 @@ void IosRunConfiguration::enabledCheck()
} }
void IosRunConfiguration::deviceChanges() { void IosRunConfiguration::deviceChanges() {
setDefaultDisplayName(defaultDisplayName()); updateDisplayNames();
enabledCheck(); enabledCheck();
} }
...@@ -131,6 +132,8 @@ void IosRunConfiguration::proFileUpdated(QmakeProjectManager::QmakeProFileNode * ...@@ -131,6 +132,8 @@ void IosRunConfiguration::proFileUpdated(QmakeProjectManager::QmakeProFileNode *
return; return;
m_parseSuccess = success; m_parseSuccess = success;
m_parseInProgress = parseInProgress; m_parseInProgress = parseInProgress;
if (success && !parseInProgress)
updateDisplayNames();
enabledCheck(); enabledCheck();
} }
...@@ -149,12 +152,13 @@ QStringList IosRunConfiguration::commandLineArguments() ...@@ -149,12 +152,13 @@ QStringList IosRunConfiguration::commandLineArguments()
return m_arguments; return m_arguments;
} }
QString IosRunConfiguration::defaultDisplayName() void IosRunConfiguration::updateDisplayNames()
{ {
ProjectExplorer::IDevice::ConstPtr dev = ProjectExplorer::IDevice::ConstPtr dev =
ProjectExplorer::DeviceKitInformation::device(target()->kit()); ProjectExplorer::DeviceKitInformation::device(target()->kit());
const QString devName = dev.isNull() ? IosDevice::name() : dev->displayName(); const QString devName = dev.isNull() ? IosDevice::name() : dev->displayName();
return tr("Run on %1").arg(devName); setDefaultDisplayName(tr("Run on %1").arg(devName));
setDisplayName(tr("Run %1 on %2").arg(appName()).arg(devName));
} }
IosDeployStep *IosRunConfiguration::deployStep() const IosDeployStep *IosRunConfiguration::deployStep() const
......
...@@ -72,7 +72,6 @@ public: ...@@ -72,7 +72,6 @@ public:
protected: protected:
IosRunConfiguration(ProjectExplorer::Target *parent, IosRunConfiguration *source); IosRunConfiguration(ProjectExplorer::Target *parent, IosRunConfiguration *source);
QString defaultDisplayName();
private slots: private slots:
void proFileUpdated(QmakeProjectManager::QmakeProFileNode *pro, bool success, bool parseInProgress); void proFileUpdated(QmakeProjectManager::QmakeProFileNode *pro, bool success, bool parseInProgress);
...@@ -81,6 +80,7 @@ private: ...@@ -81,6 +80,7 @@ private:
void init(); void init();
void enabledCheck(); void enabledCheck();
friend class IosRunConfigurationWidget; friend class IosRunConfigurationWidget;
void updateDisplayNames();
QString m_profilePath; QString m_profilePath;
QStringList m_arguments; QStringList m_arguments;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment