External Help: Make back/forward keyboard shortcuts work

Change-Id: I3e03877df8183f0c0cab4fae35ab41ce92125ccd
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Eike Ziller
2014-09-23 19:16:17 +02:00
parent 444fc88dbc
commit 3f546f7bef
4 changed files with 46 additions and 45 deletions

View File

@@ -212,7 +212,7 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error)
QAction *back = new QAction(QIcon(QLatin1String(IMAGEPATH "previous.png")),
tr("Previous Page"), this);
cmd = ActionManager::registerAction(back, "Help.Previous", modecontext);
cmd = ActionManager::registerAction(back, Constants::HELP_PREVIOUS, modecontext);
cmd->setDefaultKeySequence(QKeySequence::Back);
back->setEnabled(m_centralWidget->isBackwardAvailable());
connect(back, SIGNAL(triggered()), m_centralWidget, SLOT(backward()));
@@ -221,7 +221,7 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error)
helpButtonLayout->addWidget(toolButton(cmd, back));
QAction *next = new QAction(QIcon(QLatin1String(IMAGEPATH "next.png")), tr("Next Page"), this);
cmd = ActionManager::registerAction(next, "Help.Next", modecontext);
cmd = ActionManager::registerAction(next, Constants::HELP_NEXT, modecontext);
cmd->setDefaultKeySequence(QKeySequence::Forward);
next->setEnabled(m_centralWidget->isForwardAvailable());
connect(next, SIGNAL(triggered()), m_centralWidget, SLOT(forward()));