forked from qt-creator/qt-creator
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 d304e82e63
Change-Id: Idac207464d8844565c96718ac65a7b820f05d4b7
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -1273,6 +1273,7 @@ void DebuggerPluginPrivate::createDapDebuggerPerspective(QWidget *globalLogWindo
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
m_perspectiveDap.addToolBarAction(&m_startDapAction);
|
||||||
m_startDapAction.setToolTip(Tr::tr("Start DAP Debugging"));
|
m_startDapAction.setToolTip(Tr::tr("Start DAP Debugging"));
|
||||||
m_startDapAction.setText(Tr::tr("Start DAP Debugging"));
|
m_startDapAction.setText(Tr::tr("Start DAP Debugging"));
|
||||||
m_startDapAction.setEnabled(true);
|
m_startDapAction.setEnabled(true);
|
||||||
@@ -1281,7 +1282,6 @@ void DebuggerPluginPrivate::createDapDebuggerPerspective(QWidget *globalLogWindo
|
|||||||
m_startDapAction.setVisible(true);
|
m_startDapAction.setVisible(true);
|
||||||
|
|
||||||
m_perspectiveDap.useSubPerspectiveSwitcher(EngineManager::dapEngineChooser());
|
m_perspectiveDap.useSubPerspectiveSwitcher(EngineManager::dapEngineChooser());
|
||||||
m_perspectiveDap.addToolBarAction(&m_startDapAction);
|
|
||||||
|
|
||||||
m_perspectiveDap.addWindow(engineManagerWindow, Perspective::SplitVertical, nullptr);
|
m_perspectiveDap.addWindow(engineManagerWindow, Perspective::SplitVertical, nullptr);
|
||||||
m_perspectiveDap.addWindow(breakpointManagerWindow,
|
m_perspectiveDap.addWindow(breakpointManagerWindow,
|
||||||
|
|||||||
Reference in New Issue
Block a user