[pim/kdepim-addons] kmail/editorplugins/autogenerateanswers: Fix mem leak we need to parent to popup

Laurent Montel <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit a615d6069cf8991caff3faa491073d5756274909 by Laurent Montel.
Committed on 15/08/2026 at 13:36.
Pushed by mlaurent into branch 'master'.

Fix mem leak we need to parent to popup

M  +1    -1    kmail/editorplugins/autogenerateanswers/autogenerateanswerseditortextedit.cpp

https://invent.kde.org/pim/kdepim-addons/-/commit/a615d6069cf8991caff3faa491073d5756274909

diff --git a/kmail/editorplugins/autogenerateanswers/autogenerateanswerseditortextedit.cpp b/kmail/editorplugins/autogenerateanswers/autogenerateanswerseditortextedit.cpp
index 76550ac3a..ac599f33e 100644
--- a/kmail/editorplugins/autogenerateanswers/autogenerateanswerseditortextedit.cpp
+++ b/kmail/editorplugins/autogenerateanswers/autogenerateanswerseditortextedit.cpp
@@ -21,7 +21,7 @@ void AutoGenerateAnswersEditorTextEdit::contextMenuEvent(QContextMenuEvent *even
     QMenu *popup = createStandardContextMenu();
     if (popup) {
         popup->addSeparator();
-        auto action = new QAction(i18nc("@action", "Insert Text"), this);
+        auto action = new QAction(i18nc("@action", "Insert Text"), popup);
         popup->addAction(action);
         connect(action, &QAction::triggered, this, [this]() {
             Q_EMIT insertText(toPlainText());
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.