refactor: replace Q_OS_MAC -> Q_OS_MACOS
This commit is contained in:
committed by
Chris Rizzitello
parent
37177f8e45
commit
4285361413
@ -23,7 +23,7 @@
|
||||
#include <QMessageBox>
|
||||
#include <QSharedMemory>
|
||||
|
||||
#if defined(Q_OS_MAC)
|
||||
#if defined(Q_OS_MACOS)
|
||||
#include <Carbon/Carbon.h>
|
||||
#include <cstdlib>
|
||||
#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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#if defined(Q_OS_MAC)
|
||||
#if defined(Q_OS_MACOS)
|
||||
#include <ApplicationServices/ApplicationServices.h>
|
||||
#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();
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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<ProcessMode> 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: ";
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user