1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

Merge pull request #673 from ff2000/master

Make Ctrl+Q work on X11 inside every WM
This commit is contained in:
David Rosca 2012-12-10 04:05:24 -08:00
commit 8eaece6c1f

View File

@ -309,7 +309,14 @@ void QupZilla::setupMenu()
m_actionQuit = new QAction(QIcon::fromTheme("application-exit"), tr("Quit"), 0);
m_actionQuit->setMenuRole(QAction::QuitRole);
m_actionQuit->setShortcut(QKeySequence(QKeySequence::Quit));
QKeySequence quitSequence = QKeySequence(QKeySequence::Quit);
#ifdef Q_WS_X11
// QKeySequence::Quit returns a non-empty sequence on X11 only when running Gnome or Kde
if(quitSequence.isEmpty()) {
quitSequence = QKeySequence(Qt::CTRL + Qt::Key_Q);
}
#endif
m_actionQuit->setShortcut(quitSequence);
connect(m_actionQuit, SIGNAL(triggered()), this, SLOT(quitApp()));
/*************