From 5beb4f85163fa7b79673e41568944fcc002e0d2b Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 6 May 2022 09:57:56 +0200 Subject: [PATCH] QXmlStreamReader: port the last two int/qsizetype mismatches ... before the port of Value::len to qsizetype. Pick-to: 6.3 6.2 Task-number: QTBUG-102465 Change-Id: I7d3823dc5b39d2afade735cdcf61f77ead89738b Reviewed-by: Lars Knoll --- src/corelib/serialization/qxmlstream.g | 4 ++-- src/corelib/serialization/qxmlstreamparser_p.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/corelib/serialization/qxmlstream.g b/src/corelib/serialization/qxmlstream.g index ca798b46ac..db9be6d8ac 100644 --- a/src/corelib/serialization/qxmlstream.g +++ b/src/corelib/serialization/qxmlstream.g @@ -760,14 +760,14 @@ attlist_decl ::= langle_bang ATTLIST qname attdef_list space_opt RANGLE; case $rule_number: { if (referenceToUnparsedEntityDetected && !standalone) break; - int n = dtdAttributes.size(); + qsizetype n = dtdAttributes.size(); XmlStringRef tagName = addToStringStorage(symName(3)); while (n--) { DtdAttribute &dtdAttribute = dtdAttributes[n]; if (!dtdAttribute.tagName.isNull()) break; dtdAttribute.tagName = tagName; - for (int i = 0; i < n; ++i) { + for (qsizetype i = 0; i < n; ++i) { if ((dtdAttributes[i].tagName.isNull() || dtdAttributes[i].tagName == tagName) && dtdAttributes[i].attributeQualifiedName == dtdAttribute.attributeQualifiedName) { dtdAttribute.attributeQualifiedName.clear(); // redefined, delete it diff --git a/src/corelib/serialization/qxmlstreamparser_p.h b/src/corelib/serialization/qxmlstreamparser_p.h index a0ac276fd8..de8cfcbd23 100644 --- a/src/corelib/serialization/qxmlstreamparser_p.h +++ b/src/corelib/serialization/qxmlstreamparser_p.h @@ -486,14 +486,14 @@ bool QXmlStreamReaderPrivate::parse() case 88: { if (referenceToUnparsedEntityDetected && !standalone) break; - int n = dtdAttributes.size(); + qsizetype n = dtdAttributes.size(); XmlStringRef tagName = addToStringStorage(symName(3)); while (n--) { DtdAttribute &dtdAttribute = dtdAttributes[n]; if (!dtdAttribute.tagName.isNull()) break; dtdAttribute.tagName = tagName; - for (int i = 0; i < n; ++i) { + for (qsizetype i = 0; i < n; ++i) { if ((dtdAttributes[i].tagName.isNull() || dtdAttributes[i].tagName == tagName) && dtdAttributes[i].attributeQualifiedName == dtdAttribute.attributeQualifiedName) { dtdAttribute.attributeQualifiedName.clear(); // redefined, delete it