From 4285361413ab37314b27b92c73de8af845e3e63a Mon Sep 17 00:00:00 2001 From: sithlord48 Date: Wed, 19 Nov 2025 21:07:38 -0500 Subject: [PATCH] refactor: replace Q_OS_MAC -> Q_OS_MACOS --- src/apps/deskflow-gui/deskflow-gui.cpp | 8 ++++---- src/lib/common/Settings.h | 2 +- src/lib/gui/MainWindow.cpp | 6 +++--- src/lib/gui/MainWindow.h | 2 +- src/lib/gui/core/CoreProcess.cpp | 10 +++++----- src/lib/gui/core/CoreProcess.h | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/apps/deskflow-gui/deskflow-gui.cpp b/src/apps/deskflow-gui/deskflow-gui.cpp index 7a55b272c..918c1efaf 100644 --- a/src/apps/deskflow-gui/deskflow-gui.cpp +++ b/src/apps/deskflow-gui/deskflow-gui.cpp @@ -23,7 +23,7 @@ #include #include -#if defined(Q_OS_MAC) +#if defined(Q_OS_MACOS) #include #include #endif @@ -38,7 +38,7 @@ using namespace deskflow::gui; -#if defined(Q_OS_MAC) +#if defined(Q_OS_MACOS) bool checkMacAssistiveDevices(); #endif @@ -128,7 +128,7 @@ int main(int argc, char *argv[]) qInstallMessageHandler(deskflow::gui::messages::messageHandler); qInfo("%s v%s", kAppName, kDisplayVersion); -#if defined(Q_OS_MAC) +#if defined(Q_OS_MACOS) if (app.applicationDirPath().startsWith("/Volumes/")) { QString msgBody = QStringLiteral( @@ -155,7 +155,7 @@ int main(int argc, char *argv[]) return QApplication::exec(); } -#if defined(Q_OS_MAC) +#if defined(Q_OS_MACOS) bool checkMacAssistiveDevices() { // new in mavericks, applications are trusted individually diff --git a/src/lib/common/Settings.h b/src/lib/common/Settings.h index b66eaada0..975954ee6 100644 --- a/src/lib/common/Settings.h +++ b/src/lib/common/Settings.h @@ -21,7 +21,7 @@ public: #if defined(Q_OS_WIN) inline const static auto UserDir = QStringLiteral("%1/AppData/Roaming/%2").arg(QDir::homePath(), kAppName); inline const static auto SystemDir = QStringLiteral("%1ProgramData/%2").arg(QDir::rootPath(), kAppName); -#elif defined(Q_OS_MAC) +#elif defined(Q_OS_MACOS) inline const static auto UserDir = QStringLiteral("%1/Library/%2").arg(QDir::homePath(), kAppName); inline const static auto SystemDir = QStringLiteral("/Library/%1").arg(kAppName); #else diff --git a/src/lib/gui/MainWindow.cpp b/src/lib/gui/MainWindow.cpp index ea2e44f5a..c73d4f52e 100644 --- a/src/lib/gui/MainWindow.cpp +++ b/src/lib/gui/MainWindow.cpp @@ -49,7 +49,7 @@ #include -#if defined(Q_OS_MAC) +#if defined(Q_OS_MACOS) #include #endif @@ -1016,7 +1016,7 @@ void MainWindow::updateLocalFingerprint() void MainWindow::hide() { -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS macOSNativeHide(); #else QMainWindow::hide(); @@ -1106,7 +1106,7 @@ void MainWindow::updateScreenName() void MainWindow::showAndActivate() { -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS forceAppActive(); #endif showNormal(); diff --git a/src/lib/gui/MainWindow.h b/src/lib/gui/MainWindow.h index bfef6c92e..63db153dc 100644 --- a/src/lib/gui/MainWindow.h +++ b/src/lib/gui/MainWindow.h @@ -25,7 +25,7 @@ #include "gui/tls/TlsUtility.h" #include "net/Fingerprint.h" -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS #include "gui/OSXHelpers.h" #endif diff --git a/src/lib/gui/core/CoreProcess.cpp b/src/lib/gui/core/CoreProcess.cpp index 9726a15b7..941a839eb 100644 --- a/src/lib/gui/core/CoreProcess.cpp +++ b/src/lib/gui/core/CoreProcess.cpp @@ -10,7 +10,7 @@ #include "common/ExitCodes.h" #include "gui/ipc/DaemonIpcClient.h" -#if defined(Q_OS_MAC) +#if defined(Q_OS_MACOS) #include "OSXHelpers.h" #endif @@ -271,7 +271,7 @@ void CoreProcess::handleLogLines(const QString &text) continue; } -#if defined(Q_OS_MAC) +#if defined(Q_OS_MACOS) // HACK: macOS 10.13.4+ spamming error lines in logs making them // impossible to read and debug; giving users a red herring. if (line.contains("calling TIS/TSM in non-main thread environment")) { @@ -306,7 +306,7 @@ void CoreProcess::start(std::optional processModeOption) setProcessState(ProcessState::Starting); -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS requestOSXNotificationPermission(); #endif @@ -482,7 +482,7 @@ void CoreProcess::checkLogLine(const QString &line) // server and client processes are not allowed to show notifications. // process the log from it and show notification from deskflow instead. -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS checkOSXNotification(line); #endif } @@ -500,7 +500,7 @@ bool CoreProcess::checkSecureSocket(const QString &line) return true; } -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS void CoreProcess::checkOSXNotification(const QString &line) { static const QString needle = "OSX Notification: "; diff --git a/src/lib/gui/core/CoreProcess.h b/src/lib/gui/core/CoreProcess.h index 0e652e859..9d3308501 100644 --- a/src/lib/gui/core/CoreProcess.h +++ b/src/lib/gui/core/CoreProcess.h @@ -127,7 +127,7 @@ private: static QString processStateToString(const CoreProcess::ProcessState state); static QString wrapIpv6(const QString &address); -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS void checkOSXNotification(const QString &line); #endif