Add previous and next buttons to bookmarks pane tool bar

Task-number: QTCREATORBUG-9859
Change-Id: I2555fc89cd893681ee17b272def053f1e42e9368
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Eike Ziller
2018-04-30 13:55:36 +02:00
parent c1097cbe7f
commit 80b9f047f6
3 changed files with 26 additions and 1 deletions

View File

@@ -42,6 +42,7 @@
#include <texteditor/texteditorconstants.h>
#include <utils/fileutils.h>
#include <utils/utilsicons.h>
#include <QMenu>
@@ -113,12 +114,16 @@ BookmarksPluginRunData::BookmarksPluginRunData()
mbm->addSeparator();
// Previous
m_prevAction.setIcon(Utils::Icons::PREV_TOOLBAR.icon());
m_prevAction.setIconVisibleInMenu(false);
cmd = ActionManager::registerAction(&m_prevAction, BOOKMARKS_PREV_ACTION, editorManagerContext);
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? BookmarksPlugin::tr("Meta+,")
: BookmarksPlugin::tr("Ctrl+,")));
mbm->addAction(cmd);
// Next
m_nextAction.setIcon(Utils::Icons::NEXT_TOOLBAR.icon());
m_nextAction.setIconVisibleInMenu(false);
cmd = ActionManager::registerAction(&m_nextAction, BOOKMARKS_NEXT_ACTION, editorManagerContext);
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? BookmarksPlugin::tr("Meta+.")
: BookmarksPlugin::tr("Ctrl+.")));