Browse Source

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

Fixes #5925.
reviewable/pr5931/r1
Igor Kushnir 6 years ago
parent
commit
f9f634b326
  1. 3
      src/widget/widget.cpp

3
src/widget/widget.cpp

@ -334,7 +334,8 @@ void Widget::init() @@ -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()));

Loading…
Cancel
Save