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

qtpaths JSON output is invalid

    XMLWordPrintable

Details

    • All
    • 04f2acf93 (dev), 6a04d4dc9 (6.6), 000c78747 (6.5), fe82d78ce (tqtc/lts-6.2)

    Description

      The qtpaths and qtpaths6 binaries allow you to query data about the current Qt version. Calling `qtpaths –query --query-format=json` creates a JSON output containing the paths and Qt version. Only, the generated JSON is invalid:

      { 
      "QT_SYSROOT":"", 
      "QT_INSTALL_PREFIX":"/home/andre/Develop/Qt/6.5.0/gcc_64", 
      "QT_INSTALL_ARCHDATA":"/home/andre/Develop/Qt/6.5.0/gcc_64", 
      "QT_INSTALL_DATA":"/home/andre/Develop/Qt/6.5.0/gcc_64", 
      "QT_INSTALL_DOCS":"/home/andre/Develop/Qt/Docs/Qt-6.5.0", 
      "QT_INSTALL_HEADERS":"/home/andre/Develop/Qt/6.5.0/gcc_64/include", 
      "QT_INSTALL_LIBS":"/home/andre/Develop/Qt/6.5.0/gcc_64/lib", 
      "QT_INSTALL_LIBEXECS":"/home/andre/Develop/Qt/6.5.0/gcc_64/libexec", 
      "QT_INSTALL_BINS":"/home/andre/Develop/Qt/6.5.0/gcc_64/bin", 
      "QT_INSTALL_TESTS":"/home/andre/Develop/Qt/6.5.0/gcc_64/tests", 
      "QT_INSTALL_PLUGINS":"/home/andre/Develop/Qt/6.5.0/gcc_64/plugins", 
      "QT_INSTALL_QML":"/home/andre/Develop/Qt/6.5.0/gcc_64/qml", 
      "QT_INSTALL_TRANSLATIONS":"/home/andre/Develop/Qt/6.5.0/gcc_64/translations", 
      "QT_INSTALL_CONFIGURATION":"", 
      "QT_INSTALL_EXAMPLES":"/home/andre/Develop/Qt/Examples/Qt-6.5.0", 
      "QT_INSTALL_DEMOS":"/home/andre/Develop/Qt/Examples/Qt-6.5.0", 
      "QT_HOST_PREFIX":"/home/andre/Develop/Qt/6.5.0/gcc_64", 
      "QT_HOST_DATA":"/home/andre/Develop/Qt/6.5.0/gcc_64", 
      "QT_HOST_BINS":"/home/andre/Develop/Qt/6.5.0/gcc_64/bin", 
      "QT_HOST_LIBEXECS":"/home/andre/Develop/Qt/6.5.0/gcc_64/libexec", 
      "QT_HOST_LIBS":"/home/andre/Develop/Qt/6.5.0/gcc_64/lib", 
      "QMAKE_SPEC":"linux-g++", 
      "QMAKE_XSPEC":"linux-g++", 
      "QMAKE_VERSION":"3.1", 
      "QT_VERSION":"6.5.0", 
      }
      
      

      It is illegal to have a trailing comma after the last member of a JSON object (the comma after the QT_VERSION key/value pair). Rightfully so, QJsonDocument refuses to parse the output of this tool.

      Attachments

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

        Activity

          People

            peppe Giuseppe D'Angelo
            andre André Somers
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes