Port the QTextStream / QDebug functions away from fromAscii
No behaviour change since fromAscii (temporarily, at this point) means fromUtf8. Change-Id: I0e4d3ccfac7b5beaaaececb9f088324ee4838f84 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
This commit is contained in:
parent
fba4d96750
commit
360b682288
@ -110,7 +110,7 @@ public:
|
|||||||
{ stream->ts << QString::number(t); return maybeSpace(); }
|
{ stream->ts << QString::number(t); return maybeSpace(); }
|
||||||
inline QDebug &operator<<(float t) { stream->ts << t; return maybeSpace(); }
|
inline QDebug &operator<<(float t) { stream->ts << t; return maybeSpace(); }
|
||||||
inline QDebug &operator<<(double 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::fromAscii(t); return maybeSpace(); }
|
inline QDebug &operator<<(const char* t) { stream->ts << QString::fromUtf8(t); return maybeSpace(); }
|
||||||
inline QDebug &operator<<(const QString & t) { stream->ts << '\"' << t << '\"'; return maybeSpace(); }
|
inline QDebug &operator<<(const QString & t) { stream->ts << '\"' << t << '\"'; return maybeSpace(); }
|
||||||
inline QDebug &operator<<(const QStringRef & t) { return operator<<(t.toString()); }
|
inline QDebug &operator<<(const QStringRef & t) { return operator<<(t.toString()); }
|
||||||
inline QDebug &operator<<(const QLatin1String &t) { stream->ts << '\"' << t << '\"'; return maybeSpace(); }
|
inline QDebug &operator<<(const QLatin1String &t) { stream->ts << '\"' << t << '\"'; return maybeSpace(); }
|
||||||
|
@ -2544,13 +2544,13 @@ QTextStream &QTextStream::operator<<(const QLatin1String &string)
|
|||||||
\overload
|
\overload
|
||||||
|
|
||||||
Writes \a array to the stream. The contents of \a array are
|
Writes \a array to the stream. The contents of \a array are
|
||||||
converted with QString::fromAscii().
|
converted with QString::fromUtf8().
|
||||||
*/
|
*/
|
||||||
QTextStream &QTextStream::operator<<(const QByteArray &array)
|
QTextStream &QTextStream::operator<<(const QByteArray &array)
|
||||||
{
|
{
|
||||||
Q_D(QTextStream);
|
Q_D(QTextStream);
|
||||||
CHECK_VALID_STREAM(*this);
|
CHECK_VALID_STREAM(*this);
|
||||||
d->putString(QString::fromAscii(array.constData(), array.length()));
|
d->putString(QString::fromUtf8(array.constData(), array.length()));
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user