forked from qt-creator/qt-creator
Better disabled reason for runconfigurations
Check isEnabled() before the runcontrol factory Change-Id: Ied7e0a9c951adf5ce10f50f901af6bf24f1e3c21 Reviewed-on: http://codereview.qt.nokia.com/249 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
This commit is contained in:
@@ -2156,13 +2156,14 @@ QString ProjectExplorerPlugin::cannotRunReason(Project *project, const QString &
|
|||||||
|
|
||||||
|
|
||||||
RunConfiguration *activeRC = project->activeTarget()->activeRunConfiguration();
|
RunConfiguration *activeRC = project->activeTarget()->activeRunConfiguration();
|
||||||
|
if (!activeRC->isEnabled())
|
||||||
|
return activeRC->disabledReason();
|
||||||
|
|
||||||
// shouldn't actually be shown to the user...
|
// shouldn't actually be shown to the user...
|
||||||
if (!findRunControlFactory(activeRC, runMode))
|
if (!findRunControlFactory(activeRC, runMode))
|
||||||
return tr("Cannot run '%1' in mode '%2'.")
|
return tr("Cannot run '%1' in mode '%2'.")
|
||||||
.arg(activeRC->displayName(), runMode);
|
.arg(activeRC->displayName(), runMode);
|
||||||
|
|
||||||
if (!activeRC->isEnabled())
|
|
||||||
return activeRC->disabledReason();
|
|
||||||
|
|
||||||
if (d->m_buildManager->isBuilding())
|
if (d->m_buildManager->isBuilding())
|
||||||
return tr("A build is still in progress.");
|
return tr("A build is still in progress.");
|
||||||
|
Reference in New Issue
Block a user