summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2024-01-09 03:05:00 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2024-01-09 03:05:00 +0100
commit7b2d04cdd8a612eda4d5614346122ce0ceeca90c (patch)
treea29467c2c2c51b302af179008f5486edb8c9460f /src
parentMerge pull request #1656 from Bubu/show_pw_button (diff)
downloadnheko-7b2d04cdd8a612eda4d5614346122ce0ceeca90c.tar.xz
Fix macOS apple silicon build
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp

index efe9333d..ab030ea4 100644 --- a/src/main.cpp +++ b/src/main.cpp
@@ -19,7 +19,9 @@ #include <QStandardPaths> #include <QTranslator> -#ifdef Q_OS_UNIX +// 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) #include <QtGui/qpa/qplatformwindow_p.h> #endif @@ -157,7 +159,6 @@ main(int argc, char *argv[]) QCoreApplication::setApplicationName(QStringLiteral("nheko")); QCoreApplication::setApplicationVersion(nheko::version); QCoreApplication::setOrganizationName(QStringLiteral("nheko")); - QCoreApplication::setAttribute(Qt::AA_DontCreateNativeWidgetSiblings); // Disable the qml disk cache by default to prevent crashes on updates. See // https://github.com/Nheko-Reborn/nheko/issues/1383 @@ -167,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_MACOS) +#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) if (qgetenv("QT_SCALE_FACTOR").size() == 0) { float factor = utils::scaleFactor(); @@ -253,7 +254,7 @@ main(int argc, char *argv[]) if (!singleapp.isPrimaryInstance()) { auto token = qgetenv("XDG_ACTIVATION_TOKEN"); -#ifdef Q_OS_UNIX +#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) // 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>();