diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2024-01-09 03:17:28 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2024-01-09 03:17:28 +0100 |
commit | eaea788a7fb13764d9eb47126a3ca90e4f552e05 (patch) | |
tree | 3729fa65f202c83dee5113e655ad7cf4069d0f3b /src | |
parent | Fix macOS apple silicon build (diff) | |
download | nheko-eaea788a7fb13764d9eb47126a3ca90e4f552e05.tar.xz |
Use macos define everywhere
Diffstat (limited to 'src')
-rw-r--r-- | src/TrayIcon.cpp | 2 | ||||
-rw-r--r-- | src/UserSettingsPage.h | 4 | ||||
-rw-r--r-- | src/main.cpp | 16 |
3 files changed, 11 insertions, 11 deletions
diff --git a/src/TrayIcon.cpp b/src/TrayIcon.cpp index 8eaf522e..3b74544c 100644 --- a/src/TrayIcon.cpp +++ b/src/TrayIcon.cpp @@ -98,7 +98,7 @@ MsgCountComposedIcon::pixmap(const QSize &size, QIcon::Mode mode, QIcon::State s TrayIcon::TrayIcon(const QString &filename, QWindow *parent) : QSystemTrayIcon(parent) { -#if defined(Q_OS_MAC) || defined(Q_OS_WIN) +#if defined(Q_OS_MACOS) || defined(Q_OS_WIN) setIcon(QIcon(filename)); #else icon_ = new MsgCountComposedIcon(filename); diff --git a/src/UserSettingsPage.h b/src/UserSettingsPage.h index bc7c31ac..44cf7c84 100644 --- a/src/UserSettingsPage.h +++ b/src/UserSettingsPage.h @@ -465,7 +465,7 @@ class UserSettingsModel : public QAbstractListModel Theme, MobileMode, DisableSwipe, -#ifndef Q_OS_MAC +#ifndef Q_OS_MACOS ScaleFactor, #endif Font, @@ -551,7 +551,7 @@ class UserSettingsModel : public QAbstractListModel COUNT, // hidden for now AccessToken, -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS ScaleFactor, #endif #ifndef NHEKO_DBUS_SYS diff --git a/src/main.cpp b/src/main.cpp index ab030ea4..f3a195b9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -21,7 +21,7 @@ // in theory we can enable this everywhere, but the header is missing on some of our CI systems and // it is too much effort to install. -#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) +#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) #include <QtGui/qpa/qplatformwindow_p.h> #endif @@ -35,7 +35,7 @@ #include "Utils.h" #include "config/nheko.h" -#if defined(Q_OS_MAC) +#if defined(Q_OS_MACOS) #include "emoji/MacHelper.h" #include "notifications/Manager.h" #endif @@ -114,7 +114,7 @@ registerSignalHandlers() #endif -#if defined(GSTREAMER_AVAILABLE) && (defined(Q_OS_MAC) || defined(Q_OS_WINDOWS)) +#if defined(GSTREAMER_AVAILABLE) && (defined(Q_OS_MACOS) || defined(Q_OS_WINDOWS)) GMainLoop *gloop = 0; GThread *gthread = 0; @@ -168,7 +168,7 @@ main(int argc, char *argv[]) // this needs to be after setting the application name. Or how would we find our settings // file then? -#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) +#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) if (qgetenv("QT_SCALE_FACTOR").size() == 0) { float factor = utils::scaleFactor(); @@ -254,7 +254,7 @@ main(int argc, char *argv[]) if (!singleapp.isPrimaryInstance()) { auto token = qgetenv("XDG_ACTIVATION_TOKEN"); -#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) +#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) // getting a valid activation token on wayland is a bit of a pain, it works most reliably // when you have an actual window, that has the focus... auto waylandApp = app.nativeInterface<QNativeInterface::QWaylandApplication>(); @@ -304,7 +304,7 @@ main(int argc, char *argv[]) return 0; } -#if !defined(Q_OS_MAC) +#if !defined(Q_OS_MACOS) app.setWindowIcon(QIcon::fromTheme(QStringLiteral("nheko"), QIcon{":/logos/nheko.png"})); #endif #ifdef NHEKO_FLATPAK @@ -320,7 +320,7 @@ main(int argc, char *argv[]) registerSignalHandlers(); -#if defined(GSTREAMER_AVAILABLE) && (defined(Q_OS_MAC) || defined(Q_OS_WINDOWS)) +#if defined(GSTREAMER_AVAILABLE) && (defined(Q_OS_MACOS) || defined(Q_OS_WINDOWS)) // If the version of Qt we're running in does not use GLib, we need to // start a GMainLoop so that gstreamer can dispatch events. const QMetaObject *mo = QAbstractEventDispatcher::instance(qApp->thread())->metaObject(); @@ -469,7 +469,7 @@ main(int argc, char *argv[]) QDesktopServices::setUrlHandler( QStringLiteral("matrix"), ChatPage::instance(), "handleMatrixUri"); -#if defined(Q_OS_MAC) +#if defined(Q_OS_MACOS) // Temporary solution for the emoji picker until // nheko has a proper menu bar with more functionality. MacHelper::initializeMenus(); |