diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-07-13 15:05:27 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-07-19 09:37:53 +0000 |
commit | e0e44f0fd5b05ee299bd4e377b0d4a302c442aae (patch) | |
tree | 6d8269ea69c90ca17e290a1fa9f5316811621f6a /sources/shiboken2/generator | |
parent | b631dd9b43329bb42184ae29e8bed3d7c4f0487a (diff) |
shiboken: Refactor attribute parsing in typesystem parser
Split up the 1400 lines Handler::startElement() function into smaller
helper functions.
Previously, the function populated a hash with the default values of all
attributes. The values were then set by fetchAttributes() from the XML
attributes and applied later on. In this setup, it is not possible to add
deprecation warnings since it not possible to tell which attributes were
actually present in the file.
Change this to operate on the QXmlStreamAttributes list from which the
consumed options are removed. Add a warning about unused attributes.
It is now possible to add deprecation warnings and the default values are
now more obvious.
Task-number: PYSIDE-743
Change-Id: I1ee04e9490b3664bba4c976fe654183819610b58
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken2/generator')
0 files changed, 0 insertions, 0 deletions