qt5base-lts/tests/auto/corelib/serialization/qxmlstream
Axel Spoerl ccd8a496cf QXmlStreamReader::readNextStartElement() - return false on document end
The method reads the next element in a loop, as long as valid elements
exist. Within the loop, it returns
- false if the end of an element has been reached
- true if a new element has started

When the document end has been reached, the loop continues, until
readNext() returns Invalid. Then, PrematureEndOfDocumentError is launched.

This is wrong, because reading beyond the document end is caused by a
missing return condition in the loop.

=> Treat document end like element end and return false without
reading beyond it.

=> Test correct behavior in tst_QXmlStream::readNextStartElement()

Fixes: QTBUG-25944
Pick-to: 6.6 6.5 6.2
Change-Id: I0160b65880756a2be541e9f55dc79557fcb1f09f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-08-15 07:16:31 +02:00
..
data Correct prefix reported for end element in QXmlStreamReader 2021-04-20 03:03:51 +02:00
tokenError QXmlStreamReader: Raise error on unexpected tokens 2023-07-10 22:44:06 +02:00
XML-Test-Suite Remove execute permission from XML files 2022-01-17 18:47:22 +01:00
.gitattributes Create corelib/serialization and move existing file formats into it 2018-01-26 20:59:50 +00:00
.gitignore Create corelib/serialization and move existing file formats into it 2018-01-26 20:59:50 +00:00
CMakeLists.txt tst_QXmlStream: Fix CMakeLists.txt 2023-07-18 08:36:21 +02:00
qc14n.h qc14n.h: general cleanup 2023-05-01 22:52:22 +03:00
setupSuite.sh Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
tst_qxmlstream.cpp QXmlStreamReader::readNextStartElement() - return false on document end 2023-08-15 07:16:31 +02:00
XML-Test-Suite-LICENSE.txt Create corelib/serialization and move existing file formats into it 2018-01-26 20:59:50 +00:00