From b106eafb0edab2e596a997592e75a81396f8f36c Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Wed, 12 Jan 2022 19:09:46 +0100 Subject: Initial qml root window --- src/TrayIcon.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/TrayIcon.cpp') diff --git a/src/TrayIcon.cpp b/src/TrayIcon.cpp index d83156a4..28da9558 100644 --- a/src/TrayIcon.cpp +++ b/src/TrayIcon.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include "TrayIcon.h" @@ -100,7 +101,7 @@ MsgCountComposedIcon::pixmap(const QSize &size, QIcon::Mode mode, QIcon::State s return result; } -TrayIcon::TrayIcon(const QString &filename, QWidget *parent) +TrayIcon::TrayIcon(const QString &filename, QWindow *parent) : QSystemTrayIcon(parent) { #if defined(Q_OS_MAC) || defined(Q_OS_WIN) @@ -110,13 +111,13 @@ TrayIcon::TrayIcon(const QString &filename, QWidget *parent) setIcon(QIcon(icon_)); #endif - QMenu *menu = new QMenu(parent); + QMenu *menu = new QMenu(); setContextMenu(menu); viewAction_ = new QAction(tr("Show"), this); quitAction_ = new QAction(tr("Quit"), this); - connect(viewAction_, SIGNAL(triggered()), parent, SLOT(show())); + connect(viewAction_, &QAction::triggered, parent, &QWindow::show); connect(quitAction_, &QAction::triggered, this, QApplication::quit); menu->addAction(viewAction_); -- cgit 1.5.1