Details
-
Bug
-
Resolution: Out of scope
-
P2: Important
-
None
-
5.12.3
-
None
-
Visual Studio 2017, Windows 10
Description
This used to work in Qt 5.4.1 but after updating to Qt 5.12.3 it no longer works.
// this no longer works and QCoreApplication::arguments() does not return the right arguments int WINAPI wWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, int nCmdShow ) { return MyApplication::launchGUI(__argc, (char**)__wargv); } // this works int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pCmdLine, int nCmdShow ) { return MyApplication::launchGUI(__argc, (char**)__argv); }
If I print __argc, __argv and __wargv, the wWinMain entry point version will have __wargv set instead of __argv whereas for the WinMain entry point version, __argv is set instead of __wargv.
Stepping through QCoreApplication's code, in isArgvModified(), it doesn't seem to check for __wargv this leads to origArgv not getting initialized which leads to arguments() skipping over the code that could have returned the correct arguments based on my testing (by having isArgModified return false).