fix: windows, unable to use settings until a QApp is made

fixes: #9000
This commit is contained in:
sithlord48
2025-10-02 08:28:12 -04:00
committed by Nick Bolton
parent 06263ceaad
commit 558833ca05

View File

@ -31,6 +31,14 @@ void showHelp(const CoreArgParser &parser)
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(nullptr));
#endif
Arch arch;
arch.init();
@ -76,14 +84,6 @@ int main(int argc, char **argv)
parser.parse();
#if SYSAPI_WIN32
// HACK to make sure settings gets the correct qApp path
QCoreApplication m(argc, argv);
m.deleteLater();
ArchMiscWindows::setInstanceWin32(GetModuleHandle(nullptr));
#endif
EventQueue events;
const auto processName = QFileInfo(argv[0]).fileName();