QmlDesigner: Fix crash at shutdown

It is specifically PureActionInterface pointer that is getting deleted,
and it is subclassed, so its destructor needs to virtual for delete to
work properly.

Fixes: QDS-9221
Change-Id: Iba3b9d944de521d7e115b0d85f5a0f107b703fc1
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
Miikka Heikkinen
2023-02-21 13:34:04 +02:00
parent 87f76d9bfa
commit 9d0099245a

View File

@@ -14,6 +14,7 @@ class QMLDESIGNERCOMPONENTS_EXPORT PureActionInterface
{ {
public: public:
explicit PureActionInterface(QAction *action); explicit PureActionInterface(QAction *action);
virtual ~PureActionInterface() = default;
virtual void setSelectionContext(const SelectionContext &selectionContext) = 0; virtual void setSelectionContext(const SelectionContext &selectionContext) = 0;
QAction *action(); QAction *action();