forked from qt-creator/qt-creator
Debugger: Enable/disable debug button
The debug button should be enabled or disabled after checking if the project can be run in DebugMode. Change-Id: I2700c1de290f89bae9456319c2e93857374838ed Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -1575,8 +1575,11 @@ void DebuggerPluginPrivate::onCurrentProjectChanged(Project *project)
|
||||
m_interruptAction->setEnabled(false);
|
||||
m_continueAction->setEnabled(false);
|
||||
m_exitAction->setEnabled(false);
|
||||
m_startAction->setEnabled(true);
|
||||
m_debugWithoutDeployAction->setEnabled(true);
|
||||
ProjectExplorerPlugin *pe = ProjectExplorerPlugin::instance();
|
||||
const bool canRun = pe->canRun(project, DebugRunMode);
|
||||
m_startAction->setEnabled(canRun);
|
||||
m_startAction->setToolTip(canRun ? QString() : pe->cannotRunReason(project, DebugRunMode));
|
||||
m_debugWithoutDeployAction->setEnabled(canRun);
|
||||
setProxyAction(m_visibleStartAction, Core::Id(Constants::DEBUG));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user