refactor: replace Q_OS_MAC -> Q_OS_MACOS
This commit is contained in:
parent
37177f8e45
commit
4285361413
6 changed files with 15 additions and 15 deletions
|
|
@ -23,7 +23,7 @@
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QSharedMemory>
|
#include <QSharedMemory>
|
||||||
|
|
||||||
#if defined(Q_OS_MAC)
|
#if defined(Q_OS_MACOS)
|
||||||
#include <Carbon/Carbon.h>
|
#include <Carbon/Carbon.h>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
using namespace deskflow::gui;
|
using namespace deskflow::gui;
|
||||||
|
|
||||||
#if defined(Q_OS_MAC)
|
#if defined(Q_OS_MACOS)
|
||||||
bool checkMacAssistiveDevices();
|
bool checkMacAssistiveDevices();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -128,7 +128,7 @@ int main(int argc, char *argv[])
|
||||||
qInstallMessageHandler(deskflow::gui::messages::messageHandler);
|
qInstallMessageHandler(deskflow::gui::messages::messageHandler);
|
||||||
qInfo("%s v%s", kAppName, kDisplayVersion);
|
qInfo("%s v%s", kAppName, kDisplayVersion);
|
||||||
|
|
||||||
#if defined(Q_OS_MAC)
|
#if defined(Q_OS_MACOS)
|
||||||
|
|
||||||
if (app.applicationDirPath().startsWith("/Volumes/")) {
|
if (app.applicationDirPath().startsWith("/Volumes/")) {
|
||||||
QString msgBody = QStringLiteral(
|
QString msgBody = QStringLiteral(
|
||||||
|
|
@ -155,7 +155,7 @@ int main(int argc, char *argv[])
|
||||||
return QApplication::exec();
|
return QApplication::exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(Q_OS_MAC)
|
#if defined(Q_OS_MACOS)
|
||||||
bool checkMacAssistiveDevices()
|
bool checkMacAssistiveDevices()
|
||||||
{
|
{
|
||||||
// new in mavericks, applications are trusted individually
|
// new in mavericks, applications are trusted individually
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ public:
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
inline const static auto UserDir = QStringLiteral("%1/AppData/Roaming/%2").arg(QDir::homePath(), kAppName);
|
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);
|
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 UserDir = QStringLiteral("%1/Library/%2").arg(QDir::homePath(), kAppName);
|
||||||
inline const static auto SystemDir = QStringLiteral("/Library/%1").arg(kAppName);
|
inline const static auto SystemDir = QStringLiteral("/Library/%1").arg(kAppName);
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#if defined(Q_OS_MAC)
|
#if defined(Q_OS_MACOS)
|
||||||
#include <ApplicationServices/ApplicationServices.h>
|
#include <ApplicationServices/ApplicationServices.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -1016,7 +1016,7 @@ void MainWindow::updateLocalFingerprint()
|
||||||
|
|
||||||
void MainWindow::hide()
|
void MainWindow::hide()
|
||||||
{
|
{
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MACOS
|
||||||
macOSNativeHide();
|
macOSNativeHide();
|
||||||
#else
|
#else
|
||||||
QMainWindow::hide();
|
QMainWindow::hide();
|
||||||
|
|
@ -1106,7 +1106,7 @@ void MainWindow::updateScreenName()
|
||||||
|
|
||||||
void MainWindow::showAndActivate()
|
void MainWindow::showAndActivate()
|
||||||
{
|
{
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MACOS
|
||||||
forceAppActive();
|
forceAppActive();
|
||||||
#endif
|
#endif
|
||||||
showNormal();
|
showNormal();
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
#include "gui/tls/TlsUtility.h"
|
#include "gui/tls/TlsUtility.h"
|
||||||
#include "net/Fingerprint.h"
|
#include "net/Fingerprint.h"
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MACOS
|
||||||
#include "gui/OSXHelpers.h"
|
#include "gui/OSXHelpers.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
#include "common/ExitCodes.h"
|
#include "common/ExitCodes.h"
|
||||||
#include "gui/ipc/DaemonIpcClient.h"
|
#include "gui/ipc/DaemonIpcClient.h"
|
||||||
|
|
||||||
#if defined(Q_OS_MAC)
|
#if defined(Q_OS_MACOS)
|
||||||
#include "OSXHelpers.h"
|
#include "OSXHelpers.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -271,7 +271,7 @@ void CoreProcess::handleLogLines(const QString &text)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(Q_OS_MAC)
|
#if defined(Q_OS_MACOS)
|
||||||
// HACK: macOS 10.13.4+ spamming error lines in logs making them
|
// HACK: macOS 10.13.4+ spamming error lines in logs making them
|
||||||
// impossible to read and debug; giving users a red herring.
|
// impossible to read and debug; giving users a red herring.
|
||||||
if (line.contains("calling TIS/TSM in non-main thread environment")) {
|
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);
|
setProcessState(ProcessState::Starting);
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MACOS
|
||||||
requestOSXNotificationPermission();
|
requestOSXNotificationPermission();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -482,7 +482,7 @@ void CoreProcess::checkLogLine(const QString &line)
|
||||||
|
|
||||||
// server and client processes are not allowed to show notifications.
|
// server and client processes are not allowed to show notifications.
|
||||||
// process the log from it and show notification from deskflow instead.
|
// process the log from it and show notification from deskflow instead.
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MACOS
|
||||||
checkOSXNotification(line);
|
checkOSXNotification(line);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
@ -500,7 +500,7 @@ bool CoreProcess::checkSecureSocket(const QString &line)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MACOS
|
||||||
void CoreProcess::checkOSXNotification(const QString &line)
|
void CoreProcess::checkOSXNotification(const QString &line)
|
||||||
{
|
{
|
||||||
static const QString needle = "OSX Notification: ";
|
static const QString needle = "OSX Notification: ";
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,7 @@ private:
|
||||||
static QString processStateToString(const CoreProcess::ProcessState state);
|
static QString processStateToString(const CoreProcess::ProcessState state);
|
||||||
static QString wrapIpv6(const QString &address);
|
static QString wrapIpv6(const QString &address);
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MACOS
|
||||||
void checkOSXNotification(const QString &line);
|
void checkOSXNotification(const QString &line);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue