summaryrefslogtreecommitdiff
path: root/src/plugins/cmakeprojectmanager/cmakeeditor.cpp
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@digia.com>2014-09-02 12:25:20 +0200
committerhjk <hjk121@nokiamail.com>2014-09-02 16:48:13 +0200
commit7224ccb2e7bab5b7bca88cbcd41829fdf3c25165 (patch)
tree6c3bc438bf4e68ce06cf5afd8950d235b0bd391e /src/plugins/cmakeprojectmanager/cmakeeditor.cpp
parentcae737e6291d8349602cd9bd2e109abd0292e5af (diff)
downloadqt-creator-7224ccb2e7bab5b7bca88cbcd41829fdf3c25165.tar.gz
Editors: Automatically add editor/document id to context and use that
instead of manually adding a context everywhere. Change-Id: I4336015a6d19349171a255e949da89b0013d6700 Reviewed-by: hjk <hjk121@nokiamail.com>
Diffstat (limited to 'src/plugins/cmakeprojectmanager/cmakeeditor.cpp')
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeeditor.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmakeeditor.cpp b/src/plugins/cmakeprojectmanager/cmakeeditor.cpp
index 0b4277a9aa..df541f9abf 100644
--- a/src/plugins/cmakeprojectmanager/cmakeeditor.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeeditor.cpp
@@ -65,7 +65,6 @@ namespace Internal {
CMakeEditor::CMakeEditor()
{
- addContext(Constants::C_CMAKEEDITOR);
setDuplicateSupported(true);
setCompletionAssistProvider(ExtensionSystem::PluginManager::getObject<CMakeFileCompletionAssistProvider>());
}
@@ -289,13 +288,12 @@ CMakeEditorFactory::CMakeEditorFactory()
setGenericSyntaxHighlighter(QLatin1String(Constants::CMAKEMIMETYPE));
setCommentStyle(Utils::CommentDefinition::HashStyle);
- setEditorActionHandlers(Constants::C_CMAKEEDITOR,
- TextEditorActionHandler::UnCommentSelection
+ setEditorActionHandlers(TextEditorActionHandler::UnCommentSelection
| TextEditorActionHandler::JumpToFileUnderCursor);
ActionContainer *contextMenu = ActionManager::createMenu(Constants::M_CONTEXT);
contextMenu->addAction(ActionManager::command(TextEditor::Constants::JUMP_TO_FILE_UNDER_CURSOR));
- contextMenu->addSeparator(Context(Constants::C_CMAKEEDITOR));
+ contextMenu->addSeparator(Context(Constants::CMAKE_EDITOR_ID));
contextMenu->addAction(ActionManager::command(TextEditor::Constants::UN_COMMENT_SELECTION));
}