forked from qt-creator/qt-creator
Debugger: Fix potential crash
When triggering context menu on locals, receiving an update for locals (e.g. still running fetch of locals finishes, expanding children,..) and triggering an action referring to a former now no more existing item. Close the menu on updates to avoid this scenario. Change-Id: I273bb85d497dfbaa257f267a866ea014a7e3b209 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -1827,6 +1827,7 @@ bool WatchModel::contextMenuEvent(const ItemViewEvent &ev)
|
|||||||
menu->addAction(s.settingsDialog.action());
|
menu->addAction(s.settingsDialog.action());
|
||||||
|
|
||||||
// useDebuggingHelpers/useDynamicType have no auto-apply, but need to be persisted on triggered
|
// useDebuggingHelpers/useDynamicType have no auto-apply, but need to be persisted on triggered
|
||||||
|
connect(this, &WatchModel::dataChanged, menu, &QMenu::close);
|
||||||
connect(debugHelperAction, &QAction::triggered,
|
connect(debugHelperAction, &QAction::triggered,
|
||||||
&s.useDebuggingHelpers, &BoolAspect::writeSettings, Qt::UniqueConnection);
|
&s.useDebuggingHelpers, &BoolAspect::writeSettings, Qt::UniqueConnection);
|
||||||
connect(dynamicTypeAction, &QAction::triggered,
|
connect(dynamicTypeAction, &QAction::triggered,
|
||||||
|
|||||||
Reference in New Issue
Block a user