Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-23687

Invalid command line parsing at QCoreApplication::arguments on MS Windows family

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.4.0
    • 4.7.1, 4.7.4, 4.8.0, 4.8.4, 5.0.0
    • Core: Other
    • 1. MS Windows 7 Ultimate SP1 x86 Rus
      2. MS Visual Studio 2010 SP1
    • 9b121e5579538477a1fc7c8250e5d7e875a58de8 (dev, 15.5.2014, 5.4)

    Description

      Invalid command line parsing at QCoreApplication::arguments on MS Windows family: double backslashes not recognized.
      Compare argc/argv passed to main with result of QCoreApplication::arguments when command line is:

      qtapp.exe arg1 "arg2" "\"arg3\"" "\\arg4\\" "\\\"arg5\\\""

      I found some rules of Windows command line parsing: http://www.autohotkey.net/~deleyd/parameters/parameters.htm#WINCRULES.
      Also I tried to make solution - see attached "QtCore_winmain_argv.patch" - but it's not complete.

      Try attached "qt_4_8_0_winmain_argv_bug.zip" (solution for MSVS 2010) in debug configuration to see bug (and try it after applying "QtCore_winmain_argv.patch" - bug will still be there).

      Attachments

        1. QtCore_winmain_argv.patch
          0.6 kB
        2. qt_4_8_0_winmain_argv_bug.zip
          5 kB
        3. cli_args_bug.patch
          16 kB
        4. args.zip
          1 kB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              kleint Friedemann Kleint
              mabrarov Marat Abrarov
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes