summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qdebug.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2020-07-30 17:21:37 -0700
committerThiago Macieira <thiago.macieira@intel.com>2020-08-04 15:13:09 -0700
commitf2abfb39d775deffe16fe08a58c9518bd12c43f3 (patch)
treef02e90340330e216c433a2e24baa065a49809fd6 /src/corelib/io/qdebug.h
parent31c232d3b7297cbc288815297c75968d5c80ac18 (diff)
QDebug: add operator<<(const char16_t *)
Avoids the conversion from UTF-8 for uses that are not dumping a string. Mass conversion of Qt sources left for future opportunity. Fixes: QTBUG-85811 Change-Id: I4ca4a35b687b46c39030fffd1626ae6c3294cacf Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/io/qdebug.h')
-rw-r--r--src/corelib/io/qdebug.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/io/qdebug.h b/src/corelib/io/qdebug.h
index 46fd762874..77004ef952 100644
--- a/src/corelib/io/qdebug.h
+++ b/src/corelib/io/qdebug.h
@@ -155,6 +155,7 @@ public:
inline QDebug &operator<<(float t) { stream->ts << t; return maybeSpace(); }
inline QDebug &operator<<(double t) { stream->ts << t; return maybeSpace(); }
inline QDebug &operator<<(const char* t) { stream->ts << QString::fromUtf8(t); return maybeSpace(); }
+ inline QDebug &operator<<(const char16_t *t) { stream->ts << QStringView(t); return maybeSpace(); }
#if QT_STRINGVIEW_LEVEL < 2
inline QDebug &operator<<(const QString & t) { putString(t.constData(), uint(t.length())); return maybeSpace(); }
#endif