QTextStream: log the defect that op<< uses Latin 1

The rest of Qt, including the QString constructor, uses UTF-8 to
interpret narrow character literals. The fact that QTextStream uses
Latin 1 should be considered a defect.

We can't fix this in Qt 5, so log it for consideration in Qt 6.

Change-Id: I9e96ecd4f6aa4ff0ae08fffd14710fa61673db57
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
Thiago Macieira 2016-09-04 09:55:59 +02:00
parent 6dbb16a856
commit cec8cdba4d

View File

@ -2644,6 +2644,7 @@ QTextStream &QTextStream::operator<<(const char *string)
{
Q_D(QTextStream);
CHECK_VALID_STREAM(*this);
// ### Qt6: consider changing to UTF-8
d->putString(QLatin1String(string));
return *this;
}