ProjectExplorer: React to debuggersChanged() signal by RunConfigurations

And update the run actions in response to that.

Change-Id: I45e6ada3ff5e2b529636a3d8826114db3d1650be
Reviewed-on: http://codereview.qt.nokia.com/2339
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
This commit is contained in:
Daniel Teske
2011-07-25 13:43:42 +02:00
parent 791ee38298
commit a97999dfee
3 changed files with 4 additions and 3 deletions

View File

@@ -2073,11 +2073,15 @@ void ProjectExplorerPlugin::activeRunConfigurationChanged()
if (previousRunConfiguration) { if (previousRunConfiguration) {
disconnect(previousRunConfiguration, SIGNAL(isEnabledChanged(bool)), disconnect(previousRunConfiguration, SIGNAL(isEnabledChanged(bool)),
this, SIGNAL(updateRunActions())); this, SIGNAL(updateRunActions()));
disconnect(previousRunConfiguration, SIGNAL(debuggersChanged()),
this, SIGNAL(updateRunActions()));
} }
previousRunConfiguration = rc; previousRunConfiguration = rc;
if (rc) { if (rc) {
connect(rc, SIGNAL(isEnabledChanged(bool)), connect(rc, SIGNAL(isEnabledChanged(bool)),
this, SIGNAL(updateRunActions())); this, SIGNAL(updateRunActions()));
connect(rc, SIGNAL(debuggersChanged()),
this, SIGNAL(updateRunActions()));
} }
emit updateRunActions(); emit updateRunActions();
} }

View File

@@ -263,13 +263,11 @@ void QmlProjectRunConfigurationWidget::onViewerArgsChanged()
void QmlProjectRunConfigurationWidget::useCppDebuggerToggled(bool toggled) void QmlProjectRunConfigurationWidget::useCppDebuggerToggled(bool toggled)
{ {
m_runConfiguration->setUseCppDebugger(toggled); m_runConfiguration->setUseCppDebugger(toggled);
m_runConfiguration->updateEnabled();
} }
void QmlProjectRunConfigurationWidget::useQmlDebuggerToggled(bool toggled) void QmlProjectRunConfigurationWidget::useQmlDebuggerToggled(bool toggled)
{ {
m_runConfiguration->setUseQmlDebugger(toggled); m_runConfiguration->setUseQmlDebugger(toggled);
m_runConfiguration->updateEnabled();
} }
void QmlProjectRunConfigurationWidget::qmlDebugServerPortChanged(uint port) void QmlProjectRunConfigurationWidget::qmlDebugServerPortChanged(uint port)

View File

@@ -131,7 +131,6 @@ void RemoteLinuxRunConfiguration::init()
Qt4Project *pro = qt4Target()->qt4Project(); Qt4Project *pro = qt4Target()->qt4Project();
connect(pro, SIGNAL(proFileUpdated(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)), connect(pro, SIGNAL(proFileUpdated(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)),
this, SLOT(proFileUpdate(Qt4ProjectManager::Qt4ProFileNode*,bool,bool))); this, SLOT(proFileUpdate(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)));
connect(this, SIGNAL(debuggersChanged()), SLOT(updateEnabledState()));
connect(target(), SIGNAL(activeBuildConfigurationChanged(ProjectExplorer::BuildConfiguration*)), connect(target(), SIGNAL(activeBuildConfigurationChanged(ProjectExplorer::BuildConfiguration*)),
SLOT(updateEnabledState())); SLOT(updateEnabledState()));
} }