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

qDebug() replaces newlines with \n unless called with .noquote()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Invalid
    • Affects Version/s: 5.5.1
    • Fix Version/s: None
    • Component/s: Core: Other
    • Labels:
      None
    • Environment:
      OpenSuSE 42.1
      Linux 4.1.15-8-default #1 SMP PREEMPT Wed Jan 20 16:41:00 UTC 2016 (0e3b3ab) x86_64 x86_64 x86_64 GNU/Linux

      Description

      Previously, when QString containing newline characters was fed into qDebug() using the << operator, qDebug would print that string and make a newline in stderr everywhere where a newline character was in that string.

      Now it just prints "\n", unless you append ".noquote()".

      This forces anyone who used qDebug to output QStrings with multiline error descriptions to run through the codebase and replace qDebug() calls with qDebug().noquote().

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              thiago Thiago Macieira
              Reporter:
              scumcoder Daniil Larionov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes