From 331c3d778267c710896e7fca9f276c4af9d3a74f Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 23 Apr 2019 12:42:00 +0200 Subject: [PATCH] Debugger: Resolve ambiguity of F10 shortcut The debugger plugin (correctly) starts in a C_DEBUGGER_NOTRUNNING context, but this was not removed on engine selection, i.e. F10 stayed active for "Start and break on main" while the engine activated F10 for "Next", too. Fixes: QTCREATORBUG-22330 Change-Id: Ia0a477c8519dc0d5097e3f41a60a5a9e86124b69 Reviewed-by: David Schulz --- src/plugins/debugger/enginemanager.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/plugins/debugger/enginemanager.cpp b/src/plugins/debugger/enginemanager.cpp index ea4c67bb6e9..0ca42d64a7d 100644 --- a/src/plugins/debugger/enginemanager.cpp +++ b/src/plugins/debugger/enginemanager.cpp @@ -166,7 +166,13 @@ public: Core::Id m_previousMode; QPointer m_engineChooser; bool m_shuttingDown = false; - Context m_currentAdditionalContext; + + // This contains the contexts that need to be removed when switching + // away from the current engine item. Since the plugin itself adds + // C_DEBUGGER_NOTRUNNING on initialization this is set here as well, + // so it can be removed when switching away from the initial (null) + // engine. See QTCREATORBUG-22330. + Context m_currentAdditionalContext{Constants::C_DEBUGGER_NOTRUNNING}; }; ////////////////////////////////////////////////////////////////////////