summaryrefslogtreecommitdiff
path: root/src/plugins/help
diff options
context:
space:
mode:
authorcon <qtc-committer@nokia.com>2010-06-24 11:40:22 +0200
committercon <qtc-committer@nokia.com>2010-06-24 11:40:22 +0200
commitaf44136e22e1c0a16e526523b4e71dae6d6ca802 (patch)
treec229b33791cc9edd28ca6bcf1af8751858762033 /src/plugins/help
parent6cf98e281a570d0f7fb507d853b0e68f98f0f9f2 (diff)
parentd2944d2250131419e46987b8975a31a41ba8a68c (diff)
downloadqt-creator-af44136e22e1c0a16e526523b4e71dae6d6ca802.tar.gz
Merge remote branch 'origin/2.0'
Conflicts: doc/qtcreator.qdoc src/plugins/help/helpplugin.cpp src/plugins/projectexplorer/projectexplorer.cpp src/plugins/projectexplorer/projectexplorer.h src/plugins/qt4projectmanager/qt-maemo/maemopackagecontents.cpp src/plugins/qt4projectmanager/qt-maemo/maemopackagecontents.h src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationwidget.cpp src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.cpp src/tools/qml/qmldump/main.cpp
Diffstat (limited to 'src/plugins/help')
-rw-r--r--src/plugins/help/helpplugin.cpp36
-rw-r--r--src/plugins/help/helpplugin.h1
2 files changed, 21 insertions, 16 deletions
diff --git a/src/plugins/help/helpplugin.cpp b/src/plugins/help/helpplugin.cpp
index 971b2b04e8..57c7e769ac 100644
--- a/src/plugins/help/helpplugin.cpp
+++ b/src/plugins/help/helpplugin.cpp
@@ -385,14 +385,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(QLatin1String(SB_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(QLatin1String(SB_SEARCH), cmd);
BookmarkManager *manager = &LocalHelpManager::bookmarkManager();
BookmarkWidget *bookmarkWidget = new BookmarkWidget(manager, 0, false);
@@ -401,14 +400,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(QLatin1String(SB_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(QLatin1String(SB_BOOKMARKS), cmd);
QWidget *openPagesWidget = OpenPagesManager::instance().openPagesWidget();
openPagesWidget->setWindowTitle(tr("Open Pages"));
@@ -740,6 +738,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;
diff --git a/src/plugins/help/helpplugin.h b/src/plugins/help/helpplugin.h
index 9ad6644eb0..a5099db7f7 100644
--- a/src/plugins/help/helpplugin.h
+++ b/src/plugins/help/helpplugin.h
@@ -80,6 +80,7 @@ private slots:
void activateContents();
void activateSearch();
void activateOpenPages();
+ void activateBookmarks();
void addBookmark();
void updateFilterComboBox();