[Interest] Invalid command line parsing at QCoreApplication::arguments on MS Windows family
Marat Abrarov
abrarov at mail.ru
Tue Jan 17 19:34:08 CET 2012
Sorry. I made mistake:
> Jason H:
> Interesting find. However I'd prefer uniform parsing across all platforms for Qt apps.
> If windows rules breaks platform abstraction (requiring different command lines),
> then I would err on the side of Qt since it's goal is abstraction.
If at Windows command line arguments for Qt-based program (qt_winmain_argv_bug.exe) are
1. path1 (name of folder), contains spaces and I need to complete it with backslash
2. path2 (name of folder), contains spaces and I need to complete it with backslash
then I have to write:
qt_winmain_argv_bug.exe "path1\\" "path2\\"
In such situation QCoreApplication::arguments will return
qtArgc = 2
qtArgv[0] = qt_winmain_argv_bug.exe
qtArgv[1] = path1\" path2\"
instead of
argc = 3
argv[0] = qt_winmain_argv_bug.exe
argv[1] = path1\
argv[2] = path2\
Regards,
Marat Abrarov.
More information about the Interest
mailing list