summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa
diff options
context:
space:
mode:
authorAxel Spoerl <axel.spoerl@qt.io>2023-04-18 13:44:00 +0200
committerAxel Spoerl <axel.spoerl@qt.io>2023-04-24 21:49:29 +0200
commit11f14c3b0dee239644097b3eddbbf464e4d69600 (patch)
tree43f4a43b1eb78bcdbf60ad9d4b653967a1f9cb61 /src/plugins/platforms/cocoa
parent3fd7086878ea03861fc82348fc5b4e77f76b2a86 (diff)
QDomDocument: no longer drop a provided 'standalone' attribute if 'no'
- Definition of 'standalone' attribute: An XML declaration containing the attribute 'standalone' with its value set to 'yes', tells the parser to ignore markup declarations in the DTD and to use them only for validation. The declaration attribute is optional and defaults to 'no'. - Behavior Qt5 In qt5, DOM documents contained the standalone attribute, regardless of whether or not it was explicitly specified. - Behavior Qt6 In Qt6, the standalone attribute was only contained in a DOM document, if its value was 'yes'. If it was explicitly declared with the value being 'no', it was dropped in the DOM document. - Expected behavior If the source specified it overtly, then the generated XML should contain the attribute, even when it takes its default value. - Code base QXmlStreamReader provides a public bool getter isStandaloneDocument(). This says whether the document is standalone or not. The information whether the attribute was actually specified gets lost. In consequence, the attribute was always dropped on non-standalone documents. - Fix This patch makes hasStandalone a member of QXmlStreamReaderPrivate, to record whether the attribute has been explicitly specified. QDomParser is modified to retain the standalone attribute, if QXmlStreamReaderPrivate::hasStandalone is true. - Test The patch adds a test function in tst_QDom. Fixes: QTBUG-111200 Pick-to: 6.5 6.2 Change-Id: I06a0f230a2d69597dd6453f8fd3b036943d08735 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/plugins/platforms/cocoa')
0 files changed, 0 insertions, 0 deletions