aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/typesystem.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-07-13 15:05:27 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-07-19 09:37:53 +0000
commite0e44f0fd5b05ee299bd4e377b0d4a302c442aae (patch)
tree6d8269ea69c90ca17e290a1fa9f5316811621f6a /sources/shiboken2/ApiExtractor/typesystem.h
parentb631dd9b43329bb42184ae29e8bed3d7c4f0487a (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/ApiExtractor/typesystem.h')
-rw-r--r--sources/shiboken2/ApiExtractor/typesystem.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sources/shiboken2/ApiExtractor/typesystem.h b/sources/shiboken2/ApiExtractor/typesystem.h
index 64f41ce16..13805d47e 100644
--- a/sources/shiboken2/ApiExtractor/typesystem.h
+++ b/sources/shiboken2/ApiExtractor/typesystem.h
@@ -1588,7 +1588,8 @@ struct TypeRejection
Field, // Match className and field name
Enum, // Match className and enum name
ArgumentType, // Match className and argument type
- ReturnType // Match className and return type
+ ReturnType, // Match className and return type
+ Invalid
};
QRegularExpression className;