diff options
Diffstat (limited to 'src/corelib/io/qdebug.h')
-rw-r--r-- | src/corelib/io/qdebug.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/corelib/io/qdebug.h b/src/corelib/io/qdebug.h index 6907ed534e..f53a8a6670 100644 --- a/src/corelib/io/qdebug.h +++ b/src/corelib/io/qdebug.h @@ -140,9 +140,7 @@ public: 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 + inline QDebug &operator<<(const QString & t) { putString(t.constData(), size_t(t.length())); return maybeSpace(); } inline QDebug &operator<<(QStringView s) { putString(s.data(), size_t(s.size())); return maybeSpace(); } inline QDebug &operator<<(QUtf8StringView s) { putByteArray(reinterpret_cast<const char*>(s.data()), s.size(), ContainsBinary); return maybeSpace(); } inline QDebug &operator<<(QLatin1String t) { putByteArray(t.latin1(), t.size(), ContainsLatin1); return maybeSpace(); } @@ -322,7 +320,7 @@ inline QDebugIfHasDebugStream<T> operator<<(QDebug debug, const QContiguousCache { const QDebugStateSaver saver(debug); debug.nospace() << "QContiguousCache("; - for (int i = cache.firstIndex(); i <= cache.lastIndex(); ++i) { + for (qsizetype i = cache.firstIndex(); i <= cache.lastIndex(); ++i) { debug << cache[i]; if (i != cache.lastIndex()) debug << ", "; @@ -403,7 +401,7 @@ void qt_QMetaEnum_flagDebugOperator(QDebug &debug, size_t sizeofT, Int value) debug.resetFormat(); debug.nospace() << "QFlags(" << Qt::hex << Qt::showbase; bool needSeparator = false; - for (uint i = 0; i < sizeofT * 8; ++i) { + for (size_t i = 0; i < sizeofT * 8; ++i) { if (value & (Int(1) << i)) { if (needSeparator) debug << '|'; |