diff --git a/src/gui/application.cpp b/src/gui/application.cpp index e64949dba42b5..d15f470cfb0a0 100644 --- a/src/gui/application.cpp +++ b/src/gui/application.cpp @@ -129,7 +129,7 @@ namespace { #ifdef Q_OS_WIN class WindowsNativeEventFilter : public QAbstractNativeEventFilter { public: - bool nativeEventFilter(const QByteArray &eventType, void *message, long *result) override { + bool nativeEventFilter(const QByteArray &eventType, void *message, qintptr *result) override { const auto msg = static_cast(message); if(msg->message == WM_SYSCOLORCHANGE || msg->message == WM_SETTINGCHANGE) { if (const auto ptr = qobject_cast(QGuiApplication::instance())) { diff --git a/src/libsync/theme.cpp b/src/libsync/theme.cpp index f3ecf8e405cd9..dd583603d7943 100644 --- a/src/libsync/theme.cpp +++ b/src/libsync/theme.cpp @@ -933,11 +933,13 @@ QVariantMap Theme::systemPalette() { connectToPaletteSignal(); #if defined(Q_OS_WIN) + auto systemPalette = QGuiApplication::palette(); if(darkMode()) { - return reserveDarkPalette; + systemPalette = reserveDarkPalette; } -#endif +#else const auto systemPalette = QGuiApplication::palette(); +#endif return QVariantMap { { QStringLiteral("base"), systemPalette.base().color() }, diff --git a/src/libsync/vfs/cfapi/cfapiwrapper.cpp b/src/libsync/vfs/cfapi/cfapiwrapper.cpp index c928a3a809d23..ad1d3d1d7f911 100644 --- a/src/libsync/vfs/cfapi/cfapiwrapper.cpp +++ b/src/libsync/vfs/cfapi/cfapiwrapper.cpp @@ -29,9 +29,9 @@ #include #include +#include #include #include -#include #include "config.h" diff --git a/src/libsync/vfs/cfapi/vfs_cfapi.cpp b/src/libsync/vfs/cfapi/vfs_cfapi.cpp index 165e558cf0fe7..d9d5627029ad7 100644 --- a/src/libsync/vfs/cfapi/vfs_cfapi.cpp +++ b/src/libsync/vfs/cfapi/vfs_cfapi.cpp @@ -24,6 +24,7 @@ #include "common/syncjournaldb.h" #include "config.h" +#include #include #include