diff options
author | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-05-21 23:21:02 +0300 |
---|---|---|
committer | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-05-21 23:21:02 +0300 |
commit | 23431362d957ea24aeafc6c8048dd33c219dcbf0 (patch) | |
tree | f70143bc36e4133e0b0c56e3a66d0543be17228a | |
parent | Be explicit about room's name color (diff) | |
download | nheko-23431362d957ea24aeafc6c8048dd33c219dcbf0.tar.xz |
Properly quit app on tray icon's action
closes #30
-rw-r--r-- | src/TrayIcon.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/TrayIcon.cc b/src/TrayIcon.cc index 4954044a..2673f1b0 100644 --- a/src/TrayIcon.cc +++ b/src/TrayIcon.cc @@ -15,6 +15,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include <QApplication> #include <QTimer> #include "TrayIcon.h" @@ -69,7 +70,9 @@ TrayIcon::TrayIcon(const QString &filename, QWidget *parent) quitAction_ = new QAction("Quit", parent); connect(viewAction_, SIGNAL(triggered()), parent, SLOT(show())); - connect(quitAction_, SIGNAL(triggered()), parent, SLOT(close())); + connect(quitAction_, &QAction::triggered, this, [=]() { + QApplication::quit(); + }); menu->addAction(viewAction_); menu->addAction(quitAction_); |