summary refs log tree commit diff
path: root/src/TrayIcon.cpp
diff options
context:
space:
mode:
authorDeepBlueV7.X <nicolas.werner@hotmail.de>2022-01-30 19:18:32 +0000
committerGitHub <noreply@github.com>2022-01-30 19:18:32 +0000
commitb706e272e55bb98bc2c09813339372d7e34c44a6 (patch)
tree06d017ce059044b25862360d8702a9ef727dca17 /src/TrayIcon.cpp
parentMerge pull request #909 from tastytea/rename-manpage (diff)
parentFix list items being hoverable through between settings and new room buttons (diff)
downloadnheko-b706e272e55bb98bc2c09813339372d7e34c44a6.tar.xz
Merge pull request #893 from Nheko-Reborn/qml-root
Qml root
Diffstat (limited to 'src/TrayIcon.cpp')
-rw-r--r--src/TrayIcon.cpp7
1 files changed, 4 insertions, 3 deletions
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 <QMenu> #include <QPainter> #include <QTimer> +#include <QWindow> #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_);