diff options
author | Eike Ziller <eike.ziller@qt.io> | 2018-12-12 09:44:13 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2018-12-12 09:44:13 +0100 |
commit | 9084ca73dff77d3df8ce564a19016dfeb482ea6d (patch) | |
tree | d2adbbe2b307fd51c9dd347cc5cd4be7f9fe9203 /src/plugins/debugger/enginemanager.cpp | |
parent | 1a2a278eec7a8438006246f47932d614804e3894 (diff) | |
parent | 5cd4a73acab1ee3782747d5de55c0ae734bfba2f (diff) |
Merge remote-tracking branch 'origin/4.8'
Conflicts:
qbs/modules/qtc/qtc.qbs
qtcreator.pri
src/plugins/cpptools/compileroptionsbuilder.cpp
Change-Id: I87f47cecbb924064296a002fd9446a0627acad8e
Diffstat (limited to 'src/plugins/debugger/enginemanager.cpp')
-rw-r--r-- | src/plugins/debugger/enginemanager.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/debugger/enginemanager.cpp b/src/plugins/debugger/enginemanager.cpp index a3c503672a7..883668e498e 100644 --- a/src/plugins/debugger/enginemanager.cpp +++ b/src/plugins/debugger/enginemanager.cpp @@ -422,6 +422,18 @@ void EngineManager::activateDebugMode() } } +void EngineManager::deactivateDebugMode() +{ + if (ModeManager::currentModeId() == Constants::MODE_DEBUG && d->m_previousMode.isValid()) { + // If stopping the application also makes Qt Creator active (as the + // "previously active application"), doing the switch synchronously + // leads to funny effects with floating dock widgets + const Core::Id mode = d->m_previousMode; + QTimer::singleShot(0, d, [mode]() { ModeManager::activateMode(mode); }); + d->m_previousMode = Id(); + } +} + bool EngineManager::isLastOf(const QString &type) { int count = 0; |