From 793ea5f81c7b86a87f23da1c9783fd23b0a1ab3f Mon Sep 17 00:00:00 2001 From: sithlord48 Date: Wed, 23 Apr 2025 21:23:13 -0400 Subject: [PATCH] fix: make sure client, server and core init a qApp for Setting's to find the app path with fixes #8534 --- src/apps/deskflow-client/deskflow-client.cpp | 5 +++++ src/apps/deskflow-core/deskflow-core.cpp | 5 +++++ src/apps/deskflow-server/deskflow-server.cpp | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/src/apps/deskflow-client/deskflow-client.cpp b/src/apps/deskflow-client/deskflow-client.cpp index f35e411b5b..33483b7c5b 100644 --- a/src/apps/deskflow-client/deskflow-client.cpp +++ b/src/apps/deskflow-client/deskflow-client.cpp @@ -13,11 +13,16 @@ #if SYSAPI_WIN32 #include "arch/win32/ArchMiscWindows.h" +#include #endif int main(int argc, char **argv) { #if SYSAPI_WIN32 + // HACK to make sure settings gets the correct qApp path + QCoreApplication m(argc, argv); + m.deleteLater(); + ArchMiscWindows::guardRuntimeVersion(); // record window instance for tray icon, etc diff --git a/src/apps/deskflow-core/deskflow-core.cpp b/src/apps/deskflow-core/deskflow-core.cpp index d311c9950a..32c9e37a8c 100644 --- a/src/apps/deskflow-core/deskflow-core.cpp +++ b/src/apps/deskflow-core/deskflow-core.cpp @@ -14,6 +14,7 @@ #if SYSAPI_WIN32 #include "arch/win32/ArchMiscWindows.h" +#include #endif #include @@ -39,6 +40,10 @@ bool isClient(int argc, char **argv) int main(int argc, char **argv) { #if SYSAPI_WIN32 + // HACK to make sure settings gets the correct qApp path + QCoreApplication m(argc, argv); + m.deleteLater(); + ArchMiscWindows::setInstanceWin32(GetModuleHandle(NULL)); #endif diff --git a/src/apps/deskflow-server/deskflow-server.cpp b/src/apps/deskflow-server/deskflow-server.cpp index 7d2dd24cda..5688b72d04 100644 --- a/src/apps/deskflow-server/deskflow-server.cpp +++ b/src/apps/deskflow-server/deskflow-server.cpp @@ -13,11 +13,16 @@ #if SYSAPI_WIN32 #include "arch/win32/ArchMiscWindows.h" +#include #endif int main(int argc, char **argv) { #if SYSAPI_WIN32 + // HACK to make sure settings gets the correct qApp path + QCoreApplication m(argc, argv); + m.deleteLater(); + ArchMiscWindows::guardRuntimeVersion(); // record window instance for tray icon, etc