forked from qt-creator/qt-creator
QmlDesigner: fix crash
Task-number: QDS-11300 Change-Id: I1fe6966445284e3e9ca5596d8f5ec866f37acc39 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -78,6 +78,10 @@ void TextEditorWidget::setTextEditor(
|
||||
});
|
||||
|
||||
m_textEditor->editorWidget()->installEventFilter(this);
|
||||
// do not call the eventfilter when the m_textEditor is gone
|
||||
connect(m_textEditor->editorWidget(), &QObject::destroyed, this, [this](QObject *) {
|
||||
m_textEditor->editorWidget()->removeEventFilter(this);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user