diff --git a/src/apps/deskflow-core/deskflow-core.cpp b/src/apps/deskflow-core/deskflow-core.cpp index 5fc0d5190..a23276828 100644 --- a/src/apps/deskflow-core/deskflow-core.cpp +++ b/src/apps/deskflow-core/deskflow-core.cpp @@ -70,11 +70,6 @@ App *createApp(const CoreArgParser &parser, EventQueue &events, const QString &p int main(int argc, char **argv) { #if defined(Q_OS_WIN) - { - // HACK to make sure settings gets the correct qApp path - QCoreApplication m(argc, argv); - } - ArchMiscWindows::setInstanceWin32(GetModuleHandle(nullptr)); #endif @@ -126,9 +121,8 @@ int main(int argc, char **argv) const auto processName = QFileInfo(argv[0]).fileName(); App *coreApp = createApp(parser, events, processName); - - QApplication app(argc, argv); QApplication::setApplicationName(QStringLiteral("%1 Core").arg(kAppName)); + QApplication app(argc, argv); const auto ipcServer = new deskflow::core::ipc::CoreIpcServer(&app); // NOSONAR - Qt managed QObject::connect( diff --git a/src/apps/deskflow-daemon/deskflow-daemon.cpp b/src/apps/deskflow-daemon/deskflow-daemon.cpp index 8133ade89..0b3aba271 100644 --- a/src/apps/deskflow-daemon/deskflow-daemon.cpp +++ b/src/apps/deskflow-daemon/deskflow-daemon.cpp @@ -39,6 +39,9 @@ int main(int argc, char **argv) ArchMiscWindows::setInstanceWin32(GetModuleHandle(nullptr)); #endif + QCoreApplication::setApplicationName(QStringLiteral("%1 Daemon").arg(kAppName)); + QCoreApplication app(argc, argv); + Arch arch; arch.init(); @@ -48,9 +51,6 @@ int main(int argc, char **argv) // Daemon deliberately does not have a parent, as it will be moved to a new thread. DaemonApp daemon(events); - QCoreApplication app(argc, argv); - QCoreApplication::setApplicationName(QStringLiteral("%1 Daemon").arg(kAppName)); - QCommandLineParser parser; parser.addHelpOption(); parser.addVersionOption();