Skip to content

Commit

Permalink
fix compilation issues on windows
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu Gallien <[email protected]>
  • Loading branch information
mgallien committed Apr 10, 2024
1 parent 2f0aec4 commit e1910a8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/gui/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<MSG *>(message);
if(msg->message == WM_SYSCOLORCHANGE || msg->message == WM_SETTINGCHANGE) {
if (const auto ptr = qobject_cast<QGuiApplication *>(QGuiApplication::instance())) {
Expand Down
6 changes: 4 additions & 2 deletions src/libsync/theme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() },
Expand Down
2 changes: 1 addition & 1 deletion src/libsync/vfs/cfapi/cfapiwrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
#include <QUuid>

#include <sddl.h>
#include <ntstatus.h>
#include <cfapi.h>
#include <comdef.h>
#include <ntstatus.h>

#include "config.h"

Expand Down
1 change: 1 addition & 0 deletions src/libsync/vfs/cfapi/vfs_cfapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "common/syncjournaldb.h"
#include "config.h"

#include <ntstatus.h>
#include <cfapi.h>
#include <comdef.h>

Expand Down

0 comments on commit e1910a8

Please sign in to comment.