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>