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

Add QDebug::operator<<(const char16_t *)

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • P3: Somewhat important
    • 6.0.0 Alpha
    • 5.15.0
    • Core: Other
    • None
    • f2abfb39d775deffe16fe08a58c9518bd12c43f3

    Description

      QDebug operator<< for const char* performs a conversion from utf8 to QString each time it is called which degrades performance. While it is possible to avoid it (by wrapping each string in QStringLiteral) this is inconvenient. IMO const char* overload should avoid performing full conversion to UTF-16.

      Situation is quite similar for QLatin1String - it may end up converting to QString as well which IMO defeats the purpose of having that QLatin1String overload in the first place. 

       

      I understand that QtMessageHandler receives QString as its input but this makes logging slow and maybe it should be improved.

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            wwysota Witold Wysota
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes