1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix(ui): quit qTox on Ctrl+Q when "Close to tray" is enabled

Fixes #5925.
This commit is contained in:
Igor Kushnir 2019-11-17 15:26:49 +02:00
parent 22787a7f3c
commit f9f634b326

View File

@ -334,7 +334,8 @@ void Widget::init()
// initial request with the sanitized name so there is no work for us to do
// keyboard shortcuts
new QShortcut(Qt::CTRL + Qt::Key_Q, this, SLOT(close()));
auto* const quitShortcut = new QShortcut(Qt::CTRL + Qt::Key_Q, this);
connect(quitShortcut, &QShortcut::activated, qApp, &QApplication::quit);
new QShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_Tab, this, SLOT(previousContact()));
new QShortcut(Qt::CTRL + Qt::Key_Tab, this, SLOT(nextContact()));
new QShortcut(Qt::CTRL + Qt::Key_PageUp, this, SLOT(previousContact()));