summaryrefslogtreecommitdiffstats
path: root/src/xml/dom/qdomhelpers.cpp
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2022-04-26 15:08:56 +0200
committerSona Kurazyan <sona.kurazyan@qt.io>2022-04-28 15:17:23 +0200
commitd3457c39c4420cb46bfefb6eb85f8e4508dc500c (patch)
tree4d3fa36a40fcb791b8fdb1df5557dda7f3b50753 /src/xml/dom/qdomhelpers.cpp
parent79cf895c700f2a700479eae10cf538d0860e1d29 (diff)
QtXml: replace QLatin1String uses with _L1 or _s
As a drive-by, fix qsizetype -> int narrowing conversion warnings for the touched lines. Task-number: QTBUG-98434 Change-Id: I4f337501e4cf445ded75b414a41bbd85dfd38900 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/xml/dom/qdomhelpers.cpp')
-rw-r--r--src/xml/dom/qdomhelpers.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/xml/dom/qdomhelpers.cpp b/src/xml/dom/qdomhelpers.cpp
index b8d25598c86..67844676ff5 100644
--- a/src/xml/dom/qdomhelpers.cpp
+++ b/src/xml/dom/qdomhelpers.cpp
@@ -50,6 +50,8 @@
QT_BEGIN_NAMESPACE
+using namespace Qt::StringLiterals;
+
/**************************************************************
*
* QDomBuilder
@@ -269,23 +271,23 @@ bool QDomParser::parseProlog()
switch (reader->tokenType()) {
case QXmlStreamReader::StartDocument:
if (!reader->documentVersion().isEmpty()) {
- QString value(QLatin1String("version='"));
+ QString value(u"version='"_s);
value += reader->documentVersion();
value += u'\'';
if (!reader->documentEncoding().isEmpty()) {
- value += QLatin1String(" encoding='");
+ value += u" encoding='"_s;
value += reader->documentEncoding();
value += u'\'';
}
if (reader->isStandaloneDocument()) {
- value += QLatin1String(" standalone='yes'");
+ value += u" standalone='yes'"_s;
} else {
// TODO: Add standalone='no', if 'standalone' is specified. With the current
// QXmlStreamReader there is no way to figure out if it was specified or not.
// QXmlStreamReader needs to be modified for handling that case correctly.
}
- if (!domBuilder.processingInstruction(QLatin1String("xml"), value)) {
+ if (!domBuilder.processingInstruction(u"xml"_s, value)) {
domBuilder.fatalError(
QDomParser::tr("Error occurred while processing XML declaration"));
return false;