diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index e4cd12d1a3b..9909ef8d508 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -8528,6 +8528,7 @@ public: CommentDefinition m_commentDefinition; QList m_hoverHandlers; // owned CompletionAssistProvider * m_completionAssistProvider = nullptr; // owned + std::unique_ptr m_textEditorActionHandler; bool m_useGenericHighlighter = false; bool m_duplicatedSupported = true; bool m_codeFoldingSupported = false; @@ -8602,7 +8603,8 @@ void TextEditorFactory::setAutoCompleterCreator(const AutoCompleterCreator &crea void TextEditorFactory::setEditorActionHandlers(uint optionalActions) { - new TextEditorActionHandler(this, id(), id(), optionalActions); + d->m_textEditorActionHandler.reset( + new TextEditorActionHandler(nullptr, id(), id(), optionalActions)); } void TextEditorFactory::addHoverHandler(BaseHoverHandler *handler)