diff --git a/src/widget/widget.cpp b/src/widget/widget.cpp index 89a072a60..a0279d781 100644 --- a/src/widget/widget.cpp +++ b/src/widget/widget.cpp @@ -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()));