QXmlSimpleReader: add a property to control entity expansion limit


The limit was always set to 4096 characters, but was not enforced
consistently. Now, when the limit is applied more strictly, some of
the existing valid usecases can break, so we need a way to tune the
expansion limit.

Since we want to apply it retroactively to the existing branches, we
cannot add new public API for that, so let's try to use what we have.

QXml(Simple)Reader offers a property()/setProperty()/hasProperty()
API that so far was a no-op.
Add a new property that allows tuning of the entity expansion limit.
The only problem here is that the API uses void * for the input and
return values. To avoid handing out pointers to private members, the
limit value itself is passed through the void *, converted via
qintptr. This is explained in the new documentation.

[ChangeLog][Important Behavior Changes][QXmlSimpleReader] The entity
expansion limit of 4096 characters is now applied more strictly, which
can lead to some previously valid documents to be considered malformed.
Use setProperty() with a new property
"http://qt-project.org/xml/properties/entity-expansion-limit" to adjust
the limit.

Fixes: QTBUG-149213
Pick-to: 6.12 6.8 6.5 5.15
Change-Id: If4cd2244e423ea5c3e97041cedc12e77c5d88099
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
commit3aee49e27e58b41af1050ec1b71bb71a9ad5ddfc
parent039d8e1ef3e7e5b23924bcfa725bd80d6368e0ab
authorIvan Solovev <ivan.solovev@qt.io>
committerIvan Solovev <ivan.solovev@qt.io>
commit timeMon, 19 Oct 2026 18:34:07 +0000