Quit Subsurface with user manual window in front

Add ability to quit Subsurface with a Ctrl-Q shortcut even if the user
manual window is active.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-04-24 16:19:09 -07:00
parent b068ae6019
commit 126106f9b0
2 changed files with 3 additions and 1 deletions

View file

@ -592,7 +592,7 @@ void MainWindow::on_actionUserManual_triggered()
{
#ifndef NO_USERMANUAL
if (!helpView) {
helpView = new UserManual();
helpView = new UserManual(this);
}
helpView->show();
#endif

View file

@ -13,6 +13,8 @@ UserManual::UserManual(QWidget *parent) : QMainWindow(parent),
QShortcut* closeKey = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), this);
connect(closeKey, SIGNAL(activated()), this, SLOT(close()));
QShortcut* quitKey = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q), this);
connect(quitKey, SIGNAL(activated()), parent, SLOT(close()));
QAction *actionShowSearch = new QAction(this);
actionShowSearch->setShortcut(Qt::CTRL + Qt::Key_F);