Debugger: Fix switching to previous mode on exit

This behavior was broken with refactoring done in commit
3b5ecac238. This has two main components:
1. Perspective::select() needs to call EngineManager::activateDebugMode()
   in order to save the previous mode.
2. The contents of the previous function
   DebuggerPluginPrivate::activatePreviousMode() was placed in
   EngineManager::deactivateDebugMode() and is called in
   doFinishDebugger().

Task-number: QTCREATORBUG-21415
Change-Id: Ibca188ba740027769c497e25ea695af8e218ea4e
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Aaron Barany
2018-12-08 00:01:42 -08:00
parent 77ad54a6ef
commit 867befc5ae
4 changed files with 17 additions and 1 deletions

View File

@@ -418,6 +418,8 @@ public:
m_watchHandler.cleanup();
m_engine->showMessage(tr("Debugger finished."), StatusBar);
m_engine->setState(DebuggerFinished); // Also destroys views.
if (boolSetting(SwitchModeOnExit))
EngineManager::deactivateDebugMode();
}
void scheduleResetLocation()