aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/bookmarks
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2016-06-24 13:54:33 +0200
committerEike Ziller <eike.ziller@qt.io>2016-06-28 07:52:03 +0000
commit090c1069297883fd4073152d0c62fd4c8e08afb3 (patch)
tree0390fc9a52d8d8622a73254354a2a1a5e249ca23 /src/plugins/bookmarks
parentd63e27d877771a42464b53b53780e91dbb5f6ec7 (diff)
Fix Ctrl+M (bookmark) in editor when help mode is visible
For external windows we need to separate the contexts in which help mode's "add bookmark" and editor's "toggle bookmark" are present. Task-number: QTCREATORBUG-16286 Change-Id: I2a7a28c75dc53e1dd0b21c0a8833bd4594d5afad Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Diffstat (limited to 'src/plugins/bookmarks')
-rw-r--r--src/plugins/bookmarks/bookmarksplugin.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/plugins/bookmarks/bookmarksplugin.cpp b/src/plugins/bookmarks/bookmarksplugin.cpp
index 8e5e75d4c3..89119bb830 100644
--- a/src/plugins/bookmarks/bookmarksplugin.cpp
+++ b/src/plugins/bookmarks/bookmarksplugin.cpp
@@ -71,9 +71,11 @@ bool BookmarksPlugin::initialize(const QStringList & /*arguments*/, QString *)
mbm->menu()->setTitle(tr("&Bookmarks"));
mtools->addMenu(mbm);
+ const Context editorManagerContext(Core::Constants::C_EDITORMANAGER);
+
//Toggle
m_toggleAction = new QAction(tr("Toggle Bookmark"), this);
- Command *cmd = ActionManager::registerAction(m_toggleAction, BOOKMARKS_TOGGLE_ACTION);
+ Command *cmd = ActionManager::registerAction(m_toggleAction, BOOKMARKS_TOGGLE_ACTION, editorManagerContext);
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+M") : tr("Ctrl+M")));
mbm->addAction(cmd);
@@ -81,13 +83,13 @@ bool BookmarksPlugin::initialize(const QStringList & /*arguments*/, QString *)
//Previous
m_prevAction = new QAction(tr("Previous Bookmark"), this);
- cmd = ActionManager::registerAction(m_prevAction, BOOKMARKS_PREV_ACTION);
+ cmd = ActionManager::registerAction(m_prevAction, BOOKMARKS_PREV_ACTION, editorManagerContext);
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+,") : tr("Ctrl+,")));
mbm->addAction(cmd);
//Next
m_nextAction = new QAction(tr("Next Bookmark"), this);
- cmd = ActionManager::registerAction(m_nextAction, BOOKMARKS_NEXT_ACTION);
+ cmd = ActionManager::registerAction(m_nextAction, BOOKMARKS_NEXT_ACTION, editorManagerContext);
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+.") : tr("Ctrl+.")));
mbm->addAction(cmd);
@@ -95,12 +97,12 @@ bool BookmarksPlugin::initialize(const QStringList & /*arguments*/, QString *)
//Previous Doc
m_docPrevAction = new QAction(tr("Previous Bookmark in Document"), this);
- cmd = ActionManager::registerAction(m_docPrevAction, BOOKMARKS_PREVDOC_ACTION);
+ cmd = ActionManager::registerAction(m_docPrevAction, BOOKMARKS_PREVDOC_ACTION, editorManagerContext);
mbm->addAction(cmd);
//Next Doc
m_docNextAction = new QAction(tr("Next Bookmark in Document"), this);
- cmd = ActionManager::registerAction(m_docNextAction, BOOKMARKS_NEXTDOC_ACTION);
+ cmd = ActionManager::registerAction(m_docNextAction, BOOKMARKS_NEXTDOC_ACTION, editorManagerContext);
mbm->addAction(cmd);
m_editBookmarkAction = new QAction(tr("Edit Bookmark"), this);