diff options
author | David Schulz <david.schulz@qt.io> | 2024-03-27 14:00:21 +0100 |
---|---|---|
committer | David Schulz <david.schulz@qt.io> | 2024-04-09 10:52:26 +0000 |
commit | 411100b0378202dc617acaa236f4730eb4cc43b2 (patch) | |
tree | 9f21fb2b88ae98c990e9e85265ba73857b0b9c05 /src/plugins/cppeditor | |
parent | c459e8d49086903389b0e428e25608b1d68e275b (diff) |
TextEditor: remove text editor action handler
Give each editor a context and register editor actions individually for
that context. This removes the need to tell the action handler the
current editor. Additionally all actions are now available in editor
widgets outside of the EditorManager.
Change-Id: I0109866b180889762f8bd8aa07874d8d7c55bfa6
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Diffstat (limited to 'src/plugins/cppeditor')
-rw-r--r-- | src/plugins/cppeditor/cppeditorplugin.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/plugins/cppeditor/cppeditorplugin.cpp b/src/plugins/cppeditor/cppeditorplugin.cpp index 4328c93970..9a11039876 100644 --- a/src/plugins/cppeditor/cppeditorplugin.cpp +++ b/src/plugins/cppeditor/cppeditorplugin.cpp @@ -75,7 +75,6 @@ #include <texteditor/colorpreviewhoverhandler.h> #include <texteditor/snippets/snippetprovider.h> #include <texteditor/texteditor.h> -#include <texteditor/texteditoractionhandler.h> #include <texteditor/texteditorconstants.h> #include <utils/algorithm.h> @@ -139,14 +138,14 @@ public: setCodeFoldingSupported(true); setParenthesesMatchingEnabled(true); - setEditorActionHandlers(TextEditorActionHandler::Format - | TextEditorActionHandler::UnCommentSelection - | TextEditorActionHandler::UnCollapseAll - | TextEditorActionHandler::FollowSymbolUnderCursor - | TextEditorActionHandler::FollowTypeUnderCursor - | TextEditorActionHandler::RenameSymbol - | TextEditorActionHandler::TypeHierarchy - | TextEditorActionHandler::FindUsage); + setOptionalActionMask(OptionalActions::Format + | OptionalActions::UnCommentSelection + | OptionalActions::UnCollapseAll + | OptionalActions::FollowSymbolUnderCursor + | OptionalActions::FollowTypeUnderCursor + | OptionalActions::RenameSymbol + | OptionalActions::TypeHierarchy + | OptionalActions::FindUsage); } }; |