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

Windows: Document change of behavior for QCoreApplication::arguments()

    XMLWordPrintable

Details

    Description

      The handling of arguments masked with ' (ASCII char 0x27) has changed in 5.1 on Windows. QCoreApplication will report the original PATH, while Qt 5.1 stripped the ':

      #include <QCoreApplication>
      #include <QDebug>
      #include <QStringList>
      int main(int argc, char *argv[])
      {
          QCoreApplication a(argc, argv);
          qDebug() << "QCoreApplicaton::arguments().last(): " << qPrintable(a.arguments().last());
      }
      

      run with 5.1:

      test.exe 'hello'
      QCoreApplicaton::arguments().last():  hello
      

      with 5.2:

      test.exe 'hello'
      QCoreApplicaton::arguments().last():  'hello'
      

      Since this might possibly affect a lot of applications, it should at least be documented. The change of behavior is most likely caused by https://codereview.qt-project.org/#change,64127 .

      Attachments

        Issue Links

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

          Activity

            People

              dfaure David Faure (Private)
              kkohne Kai Köhne
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes