From 7b3208ce0fe2cc92d22752bde48eefb7dc3734ee Mon Sep 17 00:00:00 2001
From: kh1 <qt-info@nokia.com>
Date: Fri, 6 Aug 2010 14:40:44 +0200
Subject: [PATCH] Add some more missing shortcuts.

---
 src/plugins/help/externalhelpwindow.cpp | 28 +++++++++++++++++++------
 src/plugins/help/externalhelpwindow.h   |  1 +
 src/plugins/help/helpplugin.cpp         |  2 ++
 3 files changed, 25 insertions(+), 6 deletions(-)

diff --git a/src/plugins/help/externalhelpwindow.cpp b/src/plugins/help/externalhelpwindow.cpp
index edc2a2dc840..9f51f91fc1d 100644
--- a/src/plugins/help/externalhelpwindow.cpp
+++ b/src/plugins/help/externalhelpwindow.cpp
@@ -94,10 +94,24 @@ ExternalHelpWindow::ExternalHelpWindow(QWidget *parent)
     addAction(action);
 
     action = new QAction(this);
-    action->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_0));
-    connect(action, SIGNAL(triggered()), CentralWidget::instance(), SLOT(resetZoom()));
+    action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_M));
+    connect(action, SIGNAL(triggered()), this, SIGNAL(addBookmark()));
     addAction(action);
 
+    action = new QAction(this);
+    action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_C));
+    connect(action, SIGNAL(triggered()), CentralWidget::instance(), SLOT(copy()));
+    addAction(action);
+
+    action = new QAction(this);
+    action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_P));
+    connect(action, SIGNAL(triggered()), CentralWidget::instance(), SLOT(print()));
+    addAction(action);
+
+    QAction *reset = new QAction(this);
+    connect(reset, SIGNAL(triggered()), CentralWidget::instance(), SLOT(resetZoom()));
+    addAction(reset);
+
     QAction *ctrlTab = new QAction(this);
     connect(ctrlTab, SIGNAL(triggered()), &OpenPagesManager::instance(),
         SLOT(gotoPreviousPage()));
@@ -113,13 +127,15 @@ ExternalHelpWindow::ExternalHelpWindow(QWidget *parent)
     connect(action, SIGNAL(triggered()), this, SIGNAL(showHideSidebar()));
 
 #ifdef Q_WS_MAC
+    reset->setShortcut(QKeySequence(Qt::ALT + Qt::Key_0));
     action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_0));
-    ctrlTab->setShortcut(QKeySequence(tr("Alt+Tab")));
-    ctrlShiftTab->setShortcut(QKeySequence(tr("Alt+Shift+Tab")));
+    ctrlTab->setShortcut(QKeySequence(Qt::ALT + Qt::Key_Tab));
+    ctrlShiftTab->setShortcut(QKeySequence(Qt::ALT + Qt::SHIFT + Qt::Key_Tab));
 #else
+    reset->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_0));
     action->setShortcut(QKeySequence(Qt::ALT + Qt::Key_0));
-    ctrlTab->setShortcut(QKeySequence(tr("Ctrl+Tab")));
-    ctrlShiftTab->setShortcut(QKeySequence(tr("Ctrl+Shift+Tab")));
+    ctrlTab->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Tab));
+    ctrlShiftTab->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_Tab));
 #endif
 
     QToolButton *button = new QToolButton;
diff --git a/src/plugins/help/externalhelpwindow.h b/src/plugins/help/externalhelpwindow.h
index 8dd72e21850..3d79b6e7bbe 100644
--- a/src/plugins/help/externalhelpwindow.h
+++ b/src/plugins/help/externalhelpwindow.h
@@ -52,6 +52,7 @@ signals:
     void activateSearch();
     void activateBookmarks();
     void activateOpenPages();
+    void addBookmark();
     void showHideSidebar();
 
 protected:
diff --git a/src/plugins/help/helpplugin.cpp b/src/plugins/help/helpplugin.cpp
index dfa52ef20de..0c1ef511f1f 100644
--- a/src/plugins/help/helpplugin.cpp
+++ b/src/plugins/help/helpplugin.cpp
@@ -1029,6 +1029,8 @@ void HelpPlugin::connectExternalHelpWindow()
             SLOT(activateBookmarks()));
         connect(m_externalWindow, SIGNAL(activateOpenPages()), this,
             SLOT(activateOpenPages()));
+        connect(m_externalWindow, SIGNAL(addBookmark()), this,
+            SLOT(addBookmark()));
         connect(m_externalWindow, SIGNAL(showHideSidebar()), this,
             SLOT(showHideSidebar()));
     }
-- 
GitLab