2626#include < qt/walletview.h>
2727#endif // ENABLE_WALLET
2828
29- #ifdef Q_OS_MAC
29+ #ifdef Q_OS_MACOS
3030#include < qt/macdockiconhandler.h>
3131#endif
3232
6969
7070
7171const std::string BitcoinGUI::DEFAULT_UIPLATFORM =
72- #if defined(Q_OS_MAC )
72+ #if defined(Q_OS_MACOS )
7373 " macosx"
7474#elif defined(Q_OS_WIN)
7575 " windows"
@@ -219,7 +219,7 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const PlatformStyle *_platformSty
219219 connect (labelBlocksIcon, &GUIUtil::ClickableLabel::clicked, this , &BitcoinGUI::showModalOverlay);
220220 connect (progressBar, &GUIUtil::ClickableProgressBar::clicked, this , &BitcoinGUI::showModalOverlay);
221221
222- #ifdef Q_OS_MAC
222+ #ifdef Q_OS_MACOS
223223 m_app_nap_inhibitor = new CAppNapInhibitor;
224224#endif
225225
@@ -235,7 +235,7 @@ BitcoinGUI::~BitcoinGUI()
235235 settings.setValue (" MainWindowGeometry" , saveGeometry ());
236236 if (trayIcon) // Hide tray icon, as deleting will let it linger until quit (on Ubuntu)
237237 trayIcon->hide ();
238- #ifdef Q_OS_MAC
238+ #ifdef Q_OS_MACOS
239239 delete m_app_nap_inhibitor;
240240 delete appMenuBar;
241241 MacDockIconHandler::cleanup ();
@@ -433,7 +433,7 @@ void BitcoinGUI::createActions()
433433
434434void BitcoinGUI::createMenuBar ()
435435{
436- #ifdef Q_OS_MAC
436+ #ifdef Q_OS_MACOS
437437 // Create a decoupled menu bar on Mac which stays even if the window is closed
438438 appMenuBar = new QMenuBar ();
439439#else
@@ -482,7 +482,7 @@ void BitcoinGUI::createMenuBar()
482482 minimize_action->setEnabled (window != nullptr && (window->flags () & Qt::Dialog) != Qt::Dialog && window->windowState () != Qt::WindowMinimized);
483483 });
484484
485- #ifdef Q_OS_MAC
485+ #ifdef Q_OS_MACOS
486486 QAction* zoom_action = window_menu->addAction (tr (" Zoom" ));
487487 connect (zoom_action, &QAction::triggered, [] {
488488 QWindow* window = qApp->focusWindow ();
@@ -499,7 +499,7 @@ void BitcoinGUI::createMenuBar()
499499#endif
500500
501501 if (walletFrame) {
502- #ifdef Q_OS_MAC
502+ #ifdef Q_OS_MACOS
503503 window_menu->addSeparator ();
504504 QAction* main_window_action = window_menu->addAction (tr (" Main Window" ));
505505 connect (main_window_action, &QAction::triggered, [this ] {
@@ -755,7 +755,7 @@ void BitcoinGUI::createTrayIcon()
755755{
756756 assert (QSystemTrayIcon::isSystemTrayAvailable ());
757757
758- #ifndef Q_OS_MAC
758+ #ifndef Q_OS_MACOS
759759 if (QSystemTrayIcon::isSystemTrayAvailable ()) {
760760 trayIcon = new QSystemTrayIcon (m_network_style->getTrayAndWindowIcon (), this );
761761 QString toolTip = tr (" %1 client" ).arg (PACKAGE_NAME) + " " + m_network_style->getTitleAddText ();
@@ -766,17 +766,17 @@ void BitcoinGUI::createTrayIcon()
766766
767767void BitcoinGUI::createTrayIconMenu ()
768768{
769- #ifndef Q_OS_MAC
769+ #ifndef Q_OS_MACOS
770770 if (!trayIcon) return ;
771- #endif // Q_OS_MAC
771+ #endif // Q_OS_MACOS
772772
773773 // Configuration of the tray icon (or Dock icon) menu.
774774 QAction* show_hide_action{nullptr };
775- #ifndef Q_OS_MAC
775+ #ifndef Q_OS_MACOS
776776 // Note: On macOS, the Dock icon's menu already has Show / Hide action.
777777 show_hide_action = trayIconMenu->addAction (QString (), this , &BitcoinGUI::toggleHidden);
778778 trayIconMenu->addSeparator ();
779- #endif // Q_OS_MAC
779+ #endif // Q_OS_MACOS
780780
781781 QAction* send_action{nullptr };
782782 QAction* receive_action{nullptr };
@@ -794,7 +794,7 @@ void BitcoinGUI::createTrayIconMenu()
794794 options_action->setMenuRole (QAction::PreferencesRole);
795795 QAction* node_window_action = trayIconMenu->addAction (openRPCConsoleAction->text (), openRPCConsoleAction, &QAction::trigger);
796796 QAction* quit_action{nullptr };
797- #ifndef Q_OS_MAC
797+ #ifndef Q_OS_MACOS
798798 // Note: On macOS, the Dock icon's menu already has Quit action.
799799 trayIconMenu->addSeparator ();
800800 quit_action = trayIconMenu->addAction (quitAction->text (), quitAction, &QAction::trigger);
@@ -814,7 +814,7 @@ void BitcoinGUI::createTrayIconMenu()
814814 activateWindow ();
815815 });
816816 trayIconMenu->setAsDockMenu ();
817- #endif // Q_OS_MAC
817+ #endif // Q_OS_MACOS
818818
819819 connect (
820820 // Using QSystemTrayIcon::Context is not reliable.
@@ -1006,7 +1006,7 @@ void BitcoinGUI::openOptionsDialogWithTab(OptionsDialog::Tab tab)
10061006void BitcoinGUI::setNumBlocks (int count, const QDateTime& blockDate, double nVerificationProgress, bool header, SynchronizationState sync_state)
10071007{
10081008// Disabling macOS App Nap on initial sync, disk and reindex operations.
1009- #ifdef Q_OS_MAC
1009+ #ifdef Q_OS_MACOS
10101010 if (sync_state == SynchronizationState::POST_INIT) {
10111011 m_app_nap_inhibitor->enableAppNap ();
10121012 } else {
@@ -1192,7 +1192,7 @@ void BitcoinGUI::changeEvent(QEvent *e)
11921192
11931193 QMainWindow::changeEvent (e);
11941194
1195- #ifndef Q_OS_MAC // Ignored on Mac
1195+ #ifndef Q_OS_MACOS // Ignored on Mac
11961196 if (e->type () == QEvent::WindowStateChange)
11971197 {
11981198 if (clientModel && clientModel->getOptionsModel () && clientModel->getOptionsModel ()->getMinimizeToTray ())
@@ -1215,7 +1215,7 @@ void BitcoinGUI::changeEvent(QEvent *e)
12151215
12161216void BitcoinGUI::closeEvent (QCloseEvent *event)
12171217{
1218- #ifndef Q_OS_MAC // Ignored on Mac
1218+ #ifndef Q_OS_MACOS // Ignored on Mac
12191219 if (clientModel && clientModel->getOptionsModel ())
12201220 {
12211221 if (!clientModel->getOptionsModel ()->getMinimizeOnClose ())
0 commit comments