Replace deprecated Q_OS_MAC macro (#7900)
Some checks are pending
CodeQL / Analyze (cpp) (push) Waiting to run
CodeQL / Analyze (actions) (push) Waiting to run
Build Desktop / Configure (push) Waiting to run
Build Desktop / vcpkg baseline (push) Waiting to run
Build Desktop / Debian 13 (push) Blocked by required conditions
Build Desktop / Fedora 45 release (push) Blocked by required conditions
Build Desktop / Fedora 45 debug (push) Blocked by required conditions
Build Desktop / Servatrice_Debian 12 (push) Blocked by required conditions
Build Desktop / Ubuntu 26.04 (push) Blocked by required conditions
Build Desktop / Arch (push) Blocked by required conditions
Build Desktop / Debian 12 (push) Blocked by required conditions
Build Desktop / Fedora 44 (push) Blocked by required conditions
Build Desktop / Ubuntu 24.04 (push) Blocked by required conditions
Build Desktop / Ubuntu 26.04 sanitize (push) Blocked by required conditions
Build Desktop / Ubuntu 26.04 cover (push) Blocked by required conditions
Build Desktop / macOS 14 (push) Blocked by required conditions
Build Desktop / macOS 15 (push) Blocked by required conditions
Build Desktop / macOS 27 Debug (push) Blocked by required conditions
Build Desktop / Windows 10 (push) Blocked by required conditions
Build Desktop / macOS 13 Intel (push) Blocked by required conditions
Build Desktop / Prune caches (push) Waiting to run
Build Docker / Servatrice (arm) (push) Waiting to run
Build Docker / Servatrice (x86) (push) Waiting to run
Build Docker / Publish multi-platform Servatrice image (push) Blocked by required conditions

This commit is contained in:
RickyRister 2026-11-13 02:27:29 -07:00 • committed by GitHub
parent 587c4b43c1
commit 4539a30534
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 14 additions and 14 deletions

View file

@ -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"

View file

@ -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";

View file

@ -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

View file

@ -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);

View file

@ -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/

View file

@ -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
// <build>/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);
}

View file

@ -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
// <build>/cockatrice/cockatrice.app/Contents/MacOS/cockatrice
const QByteArray configPath = "../../../qtlogging.ini";
#elif defined(Q_OS_UNIX)

View file

@ -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";