diff options
| -rw-r--r-- | src/corelib/io/qdebug.cpp | 2 | ||||
| -rw-r--r-- | src/corelib/serialization/qtextstream.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/io/qdebug.cpp b/src/corelib/io/qdebug.cpp index 501b6e7a946..be106dae5e6 100644 --- a/src/corelib/io/qdebug.cpp +++ b/src/corelib/io/qdebug.cpp @@ -313,7 +313,7 @@ void QDebug::putString(const QChar *begin, size_t length) if (stream->noQuotes) { // no quotes, write the string directly too (no pretty-printing) // this respects the QTextStream state, though - stream->ts.d_ptr->putString(begin, qsizetype(length)); + stream->ts.d_ptr->putString(QStringView{begin, qsizetype(length)}); } else { // we'll reset the QTextStream formatting mechanisms, so save the state QDebugStateSaver saver(*this); diff --git a/src/corelib/serialization/qtextstream.cpp b/src/corelib/serialization/qtextstream.cpp index a89bf41c3cf..72c40661e9a 100644 --- a/src/corelib/serialization/qtextstream.cpp +++ b/src/corelib/serialization/qtextstream.cpp @@ -792,7 +792,7 @@ inline void QTextStreamPrivate::ungetChar(QChar ch) inline void QTextStreamPrivate::putChar(QChar ch) { if (params.fieldWidth > 0) - putString(&ch, 1); + putString(QStringView{&ch, 1}); else write(ch); } @@ -2485,7 +2485,7 @@ QTextStream &QTextStream::operator<<(QStringView string) { Q_D(QTextStream); CHECK_VALID_STREAM(*this); - d->putString(string.cbegin(), string.size()); + d->putString(string); return *this; } |
