mirror of
https://github.com/fergalmoran/flameshot.git
synced 2025-12-25 03:11:43 +00:00
Explicitly hide tray icon before exit on Windows
Currently flameshot tray icon will not disappear after program terminates on Windows. This is a known issue and need to be explicitly handled. This commit connects the aboutToQuit signal to QSystemTrayIcon::hide slot to ensure that the tray icon is removed before program terminates.
This commit is contained in:
committed by
borgmanJeremy
parent
2bc3d82666
commit
40629915f7
@@ -234,6 +234,13 @@ void Controller::enableTrayIcon()
|
||||
}
|
||||
};
|
||||
connect(m_trayIcon, &QSystemTrayIcon::activated, this, trayIconActivated);
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
// Ensure proper removal of tray icon when program quits on Windows.
|
||||
connect(
|
||||
qApp, &QCoreApplication::aboutToQuit, m_trayIcon, &QSystemTrayIcon::hide);
|
||||
#endif
|
||||
|
||||
m_trayIcon->show();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user