diff options
author | hjk <hjk@qt.io> | 2020-02-05 17:51:41 +0100 |
---|---|---|
committer | hjk <hjk@qt.io> | 2020-02-10 13:54:39 +0000 |
commit | 9c934ed44cd107adcef85898393ffc02e0f29e5d (patch) | |
tree | c1219b52429e61fac27c1acc4422c91799c492ad /src/plugins/texteditor/texteditoractionhandler.h | |
parent | e12ba2d68312434f50437c3b01f12834926eeb3b (diff) |
TextEditor: De-QObject-ify TextEditorActionHandler
Change-Id: I8c4919b89ce35d421edd4a21a650d5e0df4a7ead
Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/texteditor/texteditoractionhandler.h')
-rw-r--r-- | src/plugins/texteditor/texteditoractionhandler.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/plugins/texteditor/texteditoractionhandler.h b/src/plugins/texteditor/texteditoractionhandler.h index f542b5d7ce..f91ad7a806 100644 --- a/src/plugins/texteditor/texteditoractionhandler.h +++ b/src/plugins/texteditor/texteditoractionhandler.h @@ -43,9 +43,10 @@ namespace Internal { class TextEditorActionHandlerPrivate; } // Redirects slots from global actions to the respective editor. -class TEXTEDITOR_EXPORT TextEditorActionHandler : public QObject +class TEXTEDITOR_EXPORT TextEditorActionHandler final { - Q_OBJECT + TextEditorActionHandler(const TextEditorActionHandler &) = delete; + TextEditorActionHandler &operator=(const TextEditorActionHandler &) = delete; public: enum OptionalActionsMask { @@ -58,14 +59,14 @@ public: }; using TextEditorWidgetResolver = std::function<TextEditorWidget *(Core::IEditor *)>; - explicit TextEditorActionHandler(QObject *parent, Core::Id editorId, Core::Id contextId, - uint optionalActions = None); - ~TextEditorActionHandler() override; + TextEditorActionHandler(Core::Id editorId, + Core::Id contextId, + uint optionalActions = None, + const TextEditorWidgetResolver &resolver = {}); - void setTextEditorWidgetResolver(const TextEditorWidgetResolver &resolver); + ~TextEditorActionHandler(); private: - friend class Internal::TextEditorActionHandlerPrivate; Internal::TextEditorActionHandlerPrivate *d; }; |