summaryrefslogtreecommitdiffstats
path: root/src/xml/dom/qdom.cpp
diff options
context:
space:
mode:
authorSona Kurazyan <[email protected]>2022-06-30 10:16:31 +0200
committerSona Kurazyan <[email protected]>2022-08-03 20:14:42 +0200
commit7de21b268a03607455e288994085982101f5fc65 (patch)
treee6becb9e79abb1ecadbf02dc8e53dc935c95737e /src/xml/dom/qdom.cpp
parent8cc389068be398ad20188170c245ca5de305c92e (diff)
QDom: use QDomDocument::ParseResult for storing the error info
And use the new struct as a result type for error getters instead of std::tuple. The line and column numbers, therefore, grow to qsizetype instead of int. As a drive-by, make the getters inline. Change-Id: Iad652063af2c9183cb60f27320c2a800ae28ba36 Reviewed-by: Edward Welbourne <[email protected]> Reviewed-by: Thiago Macieira <[email protected]>
Diffstat (limited to 'src/xml/dom/qdom.cpp')
-rw-r--r--src/xml/dom/qdom.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/xml/dom/qdom.cpp b/src/xml/dom/qdom.cpp
index f4c49c5e8cf..74ea7d1e4eb 100644
--- a/src/xml/dom/qdom.cpp
+++ b/src/xml/dom/qdom.cpp
@@ -5625,10 +5625,8 @@ QDomDocument::ParseResult QDomDocumentPrivate::setContent(QXmlStreamReader *read
QDomParser domParser(this, reader, options);
- if (!domParser.parse()) {
- const auto info = domParser.errorInfo();
- return { std::get<0>(info), std::get<1>(info), std::get<2>(info) };
- }
+ if (!domParser.parse())
+ return domParser.result();
return {};
}