From e4ab99990e8800004ed27df9357d05866286bf95 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Tue, 29 Aug 2023 09:36:24 +0200 Subject: [PATCH] DebuggerPlugin: Fix assert on Creator startup Add toolbar action to the perspective before calling setToolButtonStyle(), otherwise the m_toolButton isn't created yet and the assert is triggered. Amends d304e82e63447ba9393332cd6e2b919c9c602bfa Change-Id: Idac207464d8844565c96718ac65a7b820f05d4b7 Reviewed-by: hjk --- src/plugins/debugger/debuggerplugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index eb09b70d002..42c5244cd57 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -1273,6 +1273,7 @@ void DebuggerPluginPrivate::createDapDebuggerPerspective(QWidget *globalLogWindo } }); + m_perspectiveDap.addToolBarAction(&m_startDapAction); m_startDapAction.setToolTip(Tr::tr("Start DAP Debugging")); m_startDapAction.setText(Tr::tr("Start DAP Debugging")); m_startDapAction.setEnabled(true); @@ -1281,7 +1282,6 @@ void DebuggerPluginPrivate::createDapDebuggerPerspective(QWidget *globalLogWindo m_startDapAction.setVisible(true); m_perspectiveDap.useSubPerspectiveSwitcher(EngineManager::dapEngineChooser()); - m_perspectiveDap.addToolBarAction(&m_startDapAction); m_perspectiveDap.addWindow(engineManagerWindow, Perspective::SplitVertical, nullptr); m_perspectiveDap.addWindow(breakpointManagerWindow,