summaryrefslogtreecommitdiffstats
path: root/src/corelib/serialization/qxmlstreamparser_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/serialization/qxmlstreamparser_p.h')
-rw-r--r--src/corelib/serialization/qxmlstreamparser_p.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/corelib/serialization/qxmlstreamparser_p.h b/src/corelib/serialization/qxmlstreamparser_p.h
index 71d5d06081..1363bf4d41 100644
--- a/src/corelib/serialization/qxmlstreamparser_p.h
+++ b/src/corelib/serialization/qxmlstreamparser_p.h
@@ -38,7 +38,7 @@
QT_BEGIN_NAMESPACE
-#ifndef QT_NO_XMLSTREAMREADER
+#if QT_CONFIG(xmlstreamreader)
bool QXmlStreamReaderPrivate::parse()
{
@@ -947,7 +947,12 @@ bool QXmlStreamReaderPrivate::parse()
break;
case 262: {
- sym(1).len += fastScanName(&sym(1).prefix);
+ Value &val = sym(1);
+ if (auto res = fastScanName(&val))
+ val.len += *res;
+ else
+ return false;
+
if (atEnd) {
resume(262);
return false;
@@ -955,7 +960,11 @@ bool QXmlStreamReaderPrivate::parse()
} break;
case 263:
- sym(1).len += fastScanName();
+ if (auto res = fastScanName())
+ sym(1).len += *res;
+ else
+ return false;
+
if (atEnd) {
resume(263);
return false;
@@ -989,7 +998,7 @@ bool QXmlStreamReaderPrivate::parse()
return false;
}
-#endif
+#endif // feature xmlstreamreader
QT_END_NAMESPACE