diff --git a/cockatrice/src/client/sound_engine.cpp b/cockatrice/src/client/sound_engine.cpp index 4ac142cf4..149d43cb4 100644 --- a/cockatrice/src/client/sound_engine.cpp +++ b/cockatrice/src/client/sound_engine.cpp @@ -113,7 +113,7 @@ QStringMap &SoundEngine::getAvailableThemes() // Load themes from Cockatrice system dir dir.setPath(qApp->applicationDirPath() + -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS "/../Resources/sounds" #elif defined(Q_OS_WIN) "/sounds" diff --git a/cockatrice/src/interface/theme_manager.cpp b/cockatrice/src/interface/theme_manager.cpp index 831e28241..dbf2af249 100644 --- a/cockatrice/src/interface/theme_manager.cpp +++ b/cockatrice/src/interface/theme_manager.cpp @@ -338,7 +338,7 @@ QString ThemeManager::writableThemeDir(const QString &themeName) static QString systemThemesBasePath() { QString base = qApp->applicationDirPath(); -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS base += "/../Resources/themes"; #elif defined(Q_OS_WIN) base += "/themes"; diff --git a/cockatrice/src/interface/widgets/server/game_selector_quick_filter_toolbar.cpp b/cockatrice/src/interface/widgets/server/game_selector_quick_filter_toolbar.cpp index 58f9bb8a9..dc79df145 100644 --- a/cockatrice/src/interface/widgets/server/game_selector_quick_filter_toolbar.cpp +++ b/cockatrice/src/interface/widgets/server/game_selector_quick_filter_toolbar.cpp @@ -92,7 +92,7 @@ GameSelectorQuickFilterToolBar::GameSelectorQuickFilterToolBar(QWidget *parent, hideFullGamesCheckBox->setMinimumSize(20, 20); hideStartedGamesCheckBox->setMinimumSize(20, 20); -#if defined(Q_OS_MAC) +#if defined(Q_OS_MACOS) mainLayout->setSpacing(6); #endif diff --git a/cockatrice/src/interface/widgets/tabs/tab_supervisor.cpp b/cockatrice/src/interface/widgets/tabs/tab_supervisor.cpp index 1881e6444..c3ab6554b 100644 --- a/cockatrice/src/interface/widgets/tabs/tab_supervisor.cpp +++ b/cockatrice/src/interface/widgets/tabs/tab_supervisor.cpp @@ -174,7 +174,7 @@ TabSupervisor::TabSupervisor(AbstractClient *_client, QMenu *tabsMenu, QWidget * setMovable(true); setIconSize(QSize(15, 15)); -#if defined(Q_OS_MAC) +#if defined(Q_OS_MACOS) // This is necessary to fix an issue on macOS, // where tabs with icons and buttons get drawn incorrectly tabBar()->setStyle(new MacOSTabFixStyle); diff --git a/cockatrice/src/interface/window_main.cpp b/cockatrice/src/interface/window_main.cpp index 8657a251e..ea18653e7 100644 --- a/cockatrice/src/interface/window_main.cpp +++ b/cockatrice/src/interface/window_main.cpp @@ -1324,7 +1324,7 @@ void MainWindow::createCardUpdateProcess(bool background) QString binaryName; QDir dir = QDir(QApplication::applicationDirPath()); -#if defined(Q_OS_MAC) +#if defined(Q_OS_MACOS) /* * bypass app translocation: quarantined application will be started from a temporary directory eg. * /private/var/folders/tk/qx76cyb50jn5dvj7rrgfscz40000gn/T/AppTranslocation/A0CBBD5A-9264-4106-8547-36B84DB161E2/d/oracle/ diff --git a/cockatrice/src/main.cpp b/cockatrice/src/main.cpp index e82867f3f..4c70eba73 100644 --- a/cockatrice/src/main.cpp +++ b/cockatrice/src/main.cpp @@ -200,7 +200,7 @@ int main(int argc, char *argv[]) // liability; unclean exits are detected via CrashReporter::beginSession below.) // Logging setup -#ifdef Q_OS_APPLE +#ifdef Q_OS_MACOS // /cockatrice/cockatrice.app/Contents/MacOS/cockatrice const QByteArray configPath = "../../../qtlogging.ini"; #elif defined(Q_OS_UNIX) @@ -224,7 +224,7 @@ int main(int argc, char *argv[]) "endif}%{if-fatal}\033[1;31mF%{endif}\033[0m] [%{function}] - %{message} [%{file}:%{line}]"); QApplication app(argc, argv); -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS UrlSchemeEventFilter cockatriceFilter(QStringList{QStringLiteral("cockatrice")}); QStringList pendingMacUrls; @@ -251,7 +251,7 @@ int main(int argc, char *argv[]) QCoreApplication::setApplicationName("Cockatrice"); QCoreApplication::setApplicationVersion(VERSION_STRING); -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS qApp->setAttribute(Qt::AA_DontShowIconsInMenus, true); #endif @@ -332,7 +332,7 @@ int main(int argc, char *argv[]) } // Translations -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS translationPath = qApp->applicationDirPath() + "/../Resources/translations"; #elif defined(Q_OS_WIN) translationPath = qApp->applicationDirPath() + "/translations"; @@ -478,7 +478,7 @@ int main(int argc, char *argv[]) bool hasUrlActivation = std::any_of(startupFiles.begin(), startupFiles.end(), [](const QString &file) { return file.startsWith(QStringLiteral("cockatrice://")); }); -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS // On macOS the launch can arrive through the URL scheme instead of as a // positional argument (captured in pendingMacUrls); count those too or the // window would auto-connect into the link's own connection attempt. @@ -504,7 +504,7 @@ int main(int argc, char *argv[]) } }; -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS QObject::disconnect(cocoaBufferConn); QObject::connect(&cockatriceFilter, &UrlSchemeEventFilter::urlReceived, @@ -545,7 +545,7 @@ int main(int argc, char *argv[]) qApp->setAttribute(Qt::AA_DontShowShortcutsInContextMenus, !SettingsCache::instance().userInterface().getShowShortcuts()); -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS for (const QString &url : pendingMacUrls) { handleActivation(url); } diff --git a/docs/doxygen/pages/developer_documentation/logging.md b/docs/doxygen/pages/developer_documentation/logging.md index 8fd5cb015..a4f3ebbcf 100644 --- a/docs/doxygen/pages/developer_documentation/logging.md +++ b/docs/doxygen/pages/developer_documentation/logging.md @@ -58,7 +58,7 @@ For configuring our logging, we use the qtlogging.ini, located under cockatrice/ baked into the application in release version and set as the QT_LOGGING_CONF environment variable in main.cpp. ```c++ -#ifdef Q_OS_APPLE +#ifdef Q_OS_MACOS // /cockatrice/cockatrice.app/Contents/MacOS/cockatrice const QByteArray configPath = "../../../qtlogging.ini"; #elif defined(Q_OS_UNIX) diff --git a/oracle/src/main.cpp b/oracle/src/main.cpp index bf56df5c9..2433fdf1e 100644 --- a/oracle/src/main.cpp +++ b/oracle/src/main.cpp @@ -57,7 +57,7 @@ int main(int argc, char *argv[]) isSpoilersOnly = parser.isSet(spoilersOnlyOption); isBackgrounded = parser.isSet(backgroundOption); -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS translationPath = qApp->applicationDirPath() + "/../Resources/translations"; #elif defined(Q_OS_WIN) translationPath = qApp->applicationDirPath() + "/translations";