Commit b35ca658 authored by Aurindam Jana's avatar Aurindam Jana

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: default avatarhjk <hjk121@nokiamail.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent 54614b03
......@@ -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));
}
......
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