Commit 38b2ffce authored by kh1's avatar kh1

Fix missing help plugin shortcuts.

Reviewed-by: ck
parent ea2aedde
......@@ -384,14 +384,13 @@ void HelpPlugin::setupUi()
connect(searchWidget, SIGNAL(linkActivated(QUrl)), m_centralWidget,
SLOT(setSourceFromSearch(QUrl)));
// TODO: enable and find a proper keysequence as this is ambiguous
// shortcut = new QShortcut(m_splitter);
// shortcut->setWhatsThis(tr("Activate Search in Help mode"));
// cmd = am->registerShortcut(shortcut, QLatin1String("Help.SearchShortcut"),
// modecontext);
// cmd->setDefaultKeySequence(QKeySequence(Qt::CTRL + Qt::Key_S));
// connect(shortcut, SIGNAL(activated()), this, SLOT(activateSearch()));
// shortcutMap.insert("Search", cmd);
shortcut = new QShortcut(m_splitter);
shortcut->setWhatsThis(tr("Activate Search in Help mode"));
cmd = am->registerShortcut(shortcut, QLatin1String("Help.SearchShortcut"),
modecontext);
cmd->setDefaultKeySequence(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_Slash));
connect(shortcut, SIGNAL(activated()), this, SLOT(activateSearch()));
shortcutMap.insert(SB_SEARCH, cmd);
BookmarkManager *manager = &LocalHelpManager::bookmarkManager();
BookmarkWidget *bookmarkWidget = new BookmarkWidget(manager, 0, false);
......@@ -400,14 +399,13 @@ void HelpPlugin::setupUi()
connect(bookmarkWidget, SIGNAL(linkActivated(QUrl)), m_centralWidget,
SLOT(setSource(QUrl)));
// TODO: enable and find a proper keysequence as this is ambiguous
// shortcut = new QShortcut(m_splitter);
// shortcut->setWhatsThis(tr("Activate Bookmarks in Help mode"));
// cmd = am->registerShortcut(shortcut, QLatin1String("Help.BookmarkShortcut"),
// modecontext);
// cmd->setDefaultKeySequence(QKeySequence(Qt::CTRL + Qt::Key_B));
// connect(shortcut, SIGNAL(activated()), this, SLOT(activateBookmarks()));
// shortcutMap.insert("Bookmarks", cmd);
shortcut = new QShortcut(m_splitter);
shortcut->setWhatsThis(tr("Activate Bookmarks in Help mode"));
cmd = am->registerShortcut(shortcut, QLatin1String("Help.BookmarkShortcut"),
modecontext);
cmd->setDefaultKeySequence(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_B));
connect(shortcut, SIGNAL(activated()), this, SLOT(activateBookmarks()));
shortcutMap.insert(SB_BOOKMARKS, cmd);
QWidget *openPagesWidget = OpenPagesManager::instance().openPagesWidget();
openPagesWidget->setWindowTitle(tr("Open Pages"));
......@@ -739,6 +737,12 @@ void HelpPlugin::activateOpenPages()
m_sideBar->activateItem(m_openPagesItem);
}
void HelpPlugin::activateBookmarks()
{
activateHelpMode();
m_sideBar->activateItem(m_bookmarkItem);
}
QToolBar *HelpPlugin::createToolBar()
{
QToolBar *toolWidget = new QToolBar;
......
......@@ -80,6 +80,7 @@ private slots:
void activateContents();
void activateSearch();
void activateOpenPages();
void activateBookmarks();
void addBookmark();
void updateFilterComboBox();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment