diff options
Diffstat (limited to 'src/corelib/xml/qxmlstream.cpp')
-rw-r--r-- | src/corelib/xml/qxmlstream.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/xml/qxmlstream.cpp b/src/corelib/xml/qxmlstream.cpp index 13c84db9ae..69e2e5d5c1 100644 --- a/src/corelib/xml/qxmlstream.cpp +++ b/src/corelib/xml/qxmlstream.cpp @@ -3013,7 +3013,8 @@ void QXmlStreamWriterPrivate::checkIfASCIICompatibleCodec() #ifndef QT_NO_TEXTCODEC Q_ASSERT(encoder); // assumes ASCII-compatibility for all 8-bit encodings - const QByteArray bytes = encoder->fromUnicode(QStringLiteral(" ")); + QChar space = QLatin1Char(' '); + const QByteArray bytes = encoder->fromUnicode(&space, 1); isCodecASCIICompatible = (bytes.count() == 1); #else isCodecASCIICompatible = true; |