forked from qt-creator/qt-creator
Debugger: Fix race condition
When getting debugger finished after a device disconnect it might re-enable the 'Start Debugging' button although debugging is not possible. Task-number: QTCREATORBUG-12585 Change-Id: I8901b440bb3e90e5f29cdeba2f6629d157c2e335 Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -2322,12 +2322,15 @@ void DebuggerPluginPrivate::updateState(DebuggerEngine *engine)
|
||||
m_hiddenStopAction->setAction(m_interruptAction);
|
||||
m_localsAndExpressionsWindow->setShowLocals(false);
|
||||
} else if (state == DebuggerFinished) {
|
||||
ProjectExplorerPlugin *pe = ProjectExplorerPlugin::instance();
|
||||
Project *project = SessionManager::startupProject();
|
||||
const bool canRun = pe->canRun(project, DebugRunMode);
|
||||
// We don't want to do anything anymore.
|
||||
m_interruptAction->setEnabled(false);
|
||||
m_continueAction->setEnabled(false);
|
||||
m_exitAction->setEnabled(false);
|
||||
m_startAction->setEnabled(true);
|
||||
m_debugWithoutDeployAction->setEnabled(true);
|
||||
m_startAction->setEnabled(canRun);
|
||||
m_debugWithoutDeployAction->setEnabled(canRun);
|
||||
setProxyAction(m_visibleStartAction, Core::Id(Constants::DEBUG));
|
||||
m_hiddenStopAction->setAction(m_undisturbableAction);
|
||||
m_codeModelSnapshot = CPlusPlus::Snapshot();
|
||||
|
||||
Reference in New Issue
Block a user