forked from qt-creator/qt-creator
ios: correctly update run configuration names
Change-Id: I46ea3e273f7e0e9a015c867a2bec261006bec117 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
@@ -100,6 +100,7 @@ void IosRunConfiguration::init()
|
||||
m_parseInProgress = project->parseInProgress(m_profilePath);
|
||||
m_lastIsEnabled = isEnabled();
|
||||
m_lastDisabledReason = disabledReason();
|
||||
updateDisplayNames();
|
||||
connect(DeviceManager::instance(), SIGNAL(updated()),
|
||||
SLOT(deviceChanges()));
|
||||
connect(KitManager::instance(), SIGNAL(kitsChanged()),
|
||||
@@ -120,7 +121,7 @@ void IosRunConfiguration::enabledCheck()
|
||||
}
|
||||
|
||||
void IosRunConfiguration::deviceChanges() {
|
||||
setDefaultDisplayName(defaultDisplayName());
|
||||
updateDisplayNames();
|
||||
enabledCheck();
|
||||
}
|
||||
|
||||
@@ -131,6 +132,8 @@ void IosRunConfiguration::proFileUpdated(QmakeProjectManager::QmakeProFileNode *
|
||||
return;
|
||||
m_parseSuccess = success;
|
||||
m_parseInProgress = parseInProgress;
|
||||
if (success && !parseInProgress)
|
||||
updateDisplayNames();
|
||||
enabledCheck();
|
||||
}
|
||||
|
||||
@@ -149,12 +152,13 @@ QStringList IosRunConfiguration::commandLineArguments()
|
||||
return m_arguments;
|
||||
}
|
||||
|
||||
QString IosRunConfiguration::defaultDisplayName()
|
||||
void IosRunConfiguration::updateDisplayNames()
|
||||
{
|
||||
ProjectExplorer::IDevice::ConstPtr dev =
|
||||
ProjectExplorer::DeviceKitInformation::device(target()->kit());
|
||||
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
|
||||
|
||||
@@ -72,7 +72,6 @@ public:
|
||||
|
||||
protected:
|
||||
IosRunConfiguration(ProjectExplorer::Target *parent, IosRunConfiguration *source);
|
||||
QString defaultDisplayName();
|
||||
|
||||
private slots:
|
||||
void proFileUpdated(QmakeProjectManager::QmakeProFileNode *pro, bool success, bool parseInProgress);
|
||||
@@ -81,6 +80,7 @@ private:
|
||||
void init();
|
||||
void enabledCheck();
|
||||
friend class IosRunConfigurationWidget;
|
||||
void updateDisplayNames();
|
||||
|
||||
QString m_profilePath;
|
||||
QStringList m_arguments;
|
||||
|
||||
Reference in New Issue
Block a user