forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -26,7 +26,6 @@
|
||||
#include <texteditor/basehoverhandler.h>
|
||||
#include <texteditor/textdocument.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <texteditor/texteditoractionhandler.h>
|
||||
|
||||
#include <utils/mimeconstants.h>
|
||||
#include <utils/textutils.h>
|
||||
@@ -533,9 +532,9 @@ public:
|
||||
setCompletionAssistProvider(new CMakeFileCompletionAssistProvider);
|
||||
setAutoCompleterCreator([] { return new CMakeAutoCompleter; });
|
||||
|
||||
setEditorActionHandlers(TextEditorActionHandler::UnCommentSelection
|
||||
| TextEditorActionHandler::FollowSymbolUnderCursor
|
||||
| TextEditorActionHandler::Format);
|
||||
setOptionalActionMask(OptionalActions::UnCommentSelection
|
||||
| OptionalActions::FollowSymbolUnderCursor
|
||||
| OptionalActions::Format);
|
||||
|
||||
addHoverHandler(new CMakeHoverHandler);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user