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

qDebug is printing escape characters from QString

    XMLWordPrintable

Details

    Description

      There were several requests/feedbacks describing this issue. It was confirmed, that starting from build 5.5 qDebug will print all escape characters (\n \t etc.) from the string passed with QString:

      qDebug() << QString("First line text\nSecond line text"); will result in "First line text\nSecond line text".

      However, the problem is, that many are constructing debug messages using QString. And it introduces some inconvenience for users who starting from 5.5.0 build are forced to use noqoute() to avoid this feature.

      Why not make the new behaviour optional, something like qDebug().escaped() ?

      Attachments

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

        Activity

          People

            laknoll Lars Knoll
            dmnikola Dmitry Nikolaev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes