Designer: Fix crash on close

...when executing plugin unit tests for Designer.

Change-Id: Ic3252bfef4559de4e54f5c3c3fd1984ab6a00f9d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
Christian Stenger
2018-11-14 08:09:14 +01:00
parent aab60ee75c
commit 1bbac68e5d
2 changed files with 11 additions and 0 deletions

View File

@@ -53,6 +53,16 @@ FormEditorStack::FormEditorStack(QWidget *parent) :
setObjectName("FormEditorStack"); setObjectName("FormEditorStack");
} }
FormEditorStack::~FormEditorStack()
{
if (m_designerCore) {
if (auto fwm = m_designerCore->formWindowManager()) {
disconnect(fwm, &QDesignerFormWindowManagerInterface::activeFormWindowChanged,
this, &FormEditorStack::updateFormWindowSelectionHandles);
}
}
}
void FormEditorStack::add(const EditorData &data) void FormEditorStack::add(const EditorData &data)
{ {
if (m_designerCore == 0) { // Initialize first time here if (m_designerCore == 0) { // Initialize first time here

View File

@@ -53,6 +53,7 @@ class FormEditorStack : public QStackedWidget
public: public:
explicit FormEditorStack(QWidget *parent = nullptr); explicit FormEditorStack(QWidget *parent = nullptr);
~FormEditorStack() override;
void add(const EditorData &d); void add(const EditorData &d);