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

QXmlStreamReader reports incorrect line number

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 5.11.1
    • None
    • Windows

    Description

      QXmlStreamReader::lineNumber() reports the incorrect line number when the XML file is encoded with \r newline notations.

      This makes troubleshooting errors very confusing, depending on which text editor the user selects to open the XML file.

      See attached XML files for examples, "cr-only" always reports the same line number, while "crlf" reports the correct line number while parsing.

      I opened the underlying QFile with QIODevice::ReadOnly | QIODevice::Text modes, if that's relevant.

      I tested on Windows 10x64 with Qt 5.11.1. I have not tested more recent versions, but I didn't see it in subsequent release notes.

      Attachments

        Activity

          People

            thiago Thiago Macieira
            phlucious Evon Silvia
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: