Debugger: Fix restoring of previous mode

We have many code paths now that try to make sure that we really end up
with debug mode when debugging, leading to multiple calls of
activateDebugMode when starting the debugger. Separate ensuring debug
mode from saving the previous mode to avoid that debug mode is always
the previous mode.

Change-Id: Ie9687e2de816b6ae55945b6108a5d4f760962f89
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Eike Ziller
2016-03-17 10:11:38 +01:00
committed by hjk
parent 3bf19030ab
commit b93f9af31a
3 changed files with 7 additions and 1 deletions

View File

@@ -141,6 +141,7 @@ QString DebuggerRunControl::displayName() const
void DebuggerRunControl::start()
{
Debugger::Internal::saveModeToRestore();
Debugger::selectPerspective(Debugger::Constants::CppPerspectiveId);
TaskHub::clearTasks(Debugger::Constants::TASK_CATEGORY_DEBUGGER_DEBUGINFO);
TaskHub::clearTasks(Debugger::Constants::TASK_CATEGORY_DEBUGGER_RUNTIME);