summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xml/sax/qxml.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/xml/sax/qxml.cpp b/src/xml/sax/qxml.cpp
index d4c8519d67..fe21bca810 100644
--- a/src/xml/sax/qxml.cpp
+++ b/src/xml/sax/qxml.cpp
@@ -1295,7 +1295,8 @@ static QString extractEncodingDecl(const QString &text, bool *needMoreText)
*needMoreText = false;
int l = text.length();
- QString snip = QString::fromLatin1("<?xml").left(l);
+ const QString declStart = QStringLiteral("<?xml");
+ const QStringRef snip = declStart.leftRef(l);
if (l > 0 && !text.startsWith(snip))
return QString();