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

"qmake -install sed" fails on input with CR+LF (0x0D+0x0A) newlines

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 5.14.1
    • 5.14
    • Build tools: qmake
    • None
    • Windows
    • 83df5c71e6bdb13569202ba84572fd2c309d63d2

    Description

      I am trying to use qmake's poor man's sed feature on QtWasm's wasm_shell.html. It generates the processed output but continues to add endless garbage data.

      The reason for it is that QTextStream::atEnd() in doSed() always returns false.

      The attached wasm_shell.html is what the Qt SDK installer installed on my Windows machine. It has CR+LF newlines. If I change the newlines of the input file to LF, the issue is gone. Alternatively, if I change the fopen mode from "r" to "rb", the issue is also gone (hint by cadam).

      How to reproduce with the attached files:

      Works with LF-only:

      qmake.exe -install sed -e s/@APPNAME@/untitled41/g wasm_shell_lf.html
      

      Fails with CR+LF:

      qmake.exe -install sed -e s/@APPNAME@/untitled41/g wasm_shell_cr_lf.html
      

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-80443
          # Subject Branch Project Status CR V

          Activity

            People

              qtbuildsystem Qt Build System Team
              portale Alessandro Portale
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes