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

QProcess: When passing in quotes in the middle of an argument they get mangled

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • Some future release
    • 4.4.2
    • Core: I/O
    • None

    Description

      QProcess: When passing in quotes in the middle of an argument they get mangled which can cause the application being started to not process those arguments correctly. It should be either possible to specify that the arguments should be untouched, or the manipulation of the quotes done internally should be removed to prevent this sort of thing occuring.

      Example:

      Doing:
      MyHelperApp.exe -e="P:\Temp\ein test\err.dat"

      works from the command line, but when trying to do this in Qt with:

      QString strCommandLine = "MyHelperApp.exe";
      QProcess *pSatProcess = new QProcess();
      pSatProcess->setWorkingDirectory(strWorkingDir);
      pSatProcess->start(strCommandLine, QStringList() << "-e=\"P:\\Temp
      ein
      test\\err.dat\"");

      the command line:
      MyHelperApp.exe "-e=P:\Temp\ein test\err.dat"

      ends up being called.

      Attachments

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

        Activity

          People

            stormols Marius Storm-Olsen
            anshaw Andy Shaw (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes