summaryrefslogtreecommitdiffstats
path: root/src/linguist/linguist/messageeditor.cpp
diff options
context:
space:
mode:
authorKai Köhne <kai.koehne@qt.io>2021-12-15 13:57:43 +0100
committerKai Koehne <kai.koehne@qt.io>2021-12-15 13:37:47 +0000
commitff2685d5a07f43b9618cb508ff193e6554e08cc0 (patch)
treee9f828d62b63b7e169523e0494ae6fcc71a7bb66 /src/linguist/linguist/messageeditor.cpp
parentb87c3573c48666ec1aba018422ab22284a6117b2 (diff)
Qt Linguist: Fix 'QObject: Q_ASSERT the object type before calling a PMF'
Make sure you disconnect the signal, otherwise it will be triggered when the child widget is destroyed, while the editor is already half-destructed. Pick-to: 6.2 6.3 Fixes: QTBUG-99232 Change-Id: I5556b6cc200a58010cab8fa2458b5c3604cbc783 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/linguist/linguist/messageeditor.cpp')
-rw-r--r--src/linguist/linguist/messageeditor.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/linguist/linguist/messageeditor.cpp b/src/linguist/linguist/messageeditor.cpp
index 03659ad9b..098abd0f6 100644
--- a/src/linguist/linguist/messageeditor.cpp
+++ b/src/linguist/linguist/messageeditor.cpp
@@ -107,6 +107,12 @@ MessageEditor::MessageEditor(MultiDataModel *dataModel, QMainWindow *parent)
showNothing();
}
+MessageEditor::~MessageEditor()
+{
+ if (FormatTextEdit *fte = qobject_cast<FormatTextEdit *>(m_selectionHolder))
+ disconnect(fte, &FormatTextEdit::editorDestroyed, this, &MessageEditor::editorDestroyed);
+}
+
void MessageEditor::setupEditorPage()
{
QFrame *editorPage = new QFrame;