mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-02-18 05:14:16 -05:00
Fix quit submenu on macOS tray icon
This commit is contained in:
parent
8d6db27b34
commit
1c54d24962
@ -747,10 +747,17 @@ void MainWindow::updateTrayIcon()
|
|||||||
QAction* actionToggle = new QAction(tr("Toggle window"), menu);
|
QAction* actionToggle = new QAction(tr("Toggle window"), menu);
|
||||||
menu->addAction(actionToggle);
|
menu->addAction(actionToggle);
|
||||||
|
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
QAction* actionQuit = new QAction(tr("Quit KeePassXC"), menu);
|
||||||
|
menu->addAction(actionQuit);
|
||||||
|
|
||||||
|
connect(actionQuit, SIGNAL(triggered()), SLOT(appExit()));
|
||||||
|
#else
|
||||||
menu->addAction(m_ui->actionQuit);
|
menu->addAction(m_ui->actionQuit);
|
||||||
|
|
||||||
connect(m_trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
|
connect(m_trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
|
||||||
SLOT(trayIconTriggered(QSystemTrayIcon::ActivationReason)));
|
SLOT(trayIconTriggered(QSystemTrayIcon::ActivationReason)));
|
||||||
|
#endif
|
||||||
connect(actionToggle, SIGNAL(triggered()), SLOT(toggleWindow()));
|
connect(actionToggle, SIGNAL(triggered()), SLOT(toggleWindow()));
|
||||||
|
|
||||||
m_trayIcon->setContextMenu(menu);
|
m_trayIcon->setContextMenu(menu);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user