Replace deprecated Q_OS_MAC macro

This commit is contained in:
RickyRister 2026-11-12 06:27:55 -07:00
parent 587c4b43c1
commit b8a3c2dc52
7 changed files with 12 additions and 12 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

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

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