mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 20:03:34 -03:00
qt, refactor: Replace BitcoinGUI::macosDockIconActivated with a lambda
This commit is contained in:
parent
8afcc89a8f
commit
c3ca8364b2
2 changed files with 4 additions and 10 deletions
|
@ -793,7 +793,10 @@ void BitcoinGUI::createTrayIconMenu()
|
|||
#else
|
||||
// Note: On macOS, the Dock icon is used to provide the tray's functionality.
|
||||
MacDockIconHandler *dockIconHandler = MacDockIconHandler::instance();
|
||||
connect(dockIconHandler, &MacDockIconHandler::dockIconClicked, this, &BitcoinGUI::macosDockIconActivated);
|
||||
connect(dockIconHandler, &MacDockIconHandler::dockIconClicked, [this] {
|
||||
show();
|
||||
activateWindow();
|
||||
});
|
||||
trayIconMenu->setAsDockMenu();
|
||||
#endif
|
||||
|
||||
|
@ -828,12 +831,6 @@ void BitcoinGUI::trayIconActivated(QSystemTrayIcon::ActivationReason reason)
|
|||
toggleHidden();
|
||||
}
|
||||
}
|
||||
#else
|
||||
void BitcoinGUI::macosDockIconActivated()
|
||||
{
|
||||
show();
|
||||
activateWindow();
|
||||
}
|
||||
#endif
|
||||
|
||||
void BitcoinGUI::optionsClicked()
|
||||
|
|
|
@ -305,9 +305,6 @@ public Q_SLOTS:
|
|||
#ifndef Q_OS_MAC
|
||||
/** Handle tray icon clicked */
|
||||
void trayIconActivated(QSystemTrayIcon::ActivationReason reason);
|
||||
#else
|
||||
/** Handle macOS Dock icon clicked */
|
||||
void macosDockIconActivated();
|
||||
#endif
|
||||
|
||||
/** Show window if hidden, unminimize when minimized, rise when obscured or show if hidden and fToggleHidden is true */
|
||||
|
|
Loading…
Reference in a new issue