diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-05-16 11:07:40 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-05-18 11:11:16 +0000 |
commit | 47e3a993965c0bc47e006914abecf98c5ad796fe (patch) | |
tree | d3b98f1b6422bc4096b994aea8c2251a13951dd7 /ApiExtractor/typesystem.cpp | |
parent | f6bc1cb55603728a0b15fd9482cccc2af86539eb (diff) |
Add rejection by function return type and argument type
Extend TypeRejection accordingly.
Task-number: PYSIDE-516
Change-Id: Ibf97f3c16498b26e63f4bde5b0ae21acc3dd0c44
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'ApiExtractor/typesystem.cpp')
-rw-r--r-- | ApiExtractor/typesystem.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ApiExtractor/typesystem.cpp b/ApiExtractor/typesystem.cpp index ed6816198..3ec82c56d 100644 --- a/ApiExtractor/typesystem.cpp +++ b/ApiExtractor/typesystem.cpp @@ -52,6 +52,8 @@ static inline QString classAttribute() { return QStringLiteral("class"); } static inline QString functionNameAttribute() { return QStringLiteral("function-name"); } static inline QString fieldNameAttribute() { return QStringLiteral("field-name"); } static inline QString enumNameAttribute() { return QStringLiteral("enum-name"); } +static inline QString argumentTypeAttribute() { return QStringLiteral("argument-type"); } +static inline QString returnTypeAttribute() { return QStringLiteral("return-type"); } static QVector<CustomConversion *> customConversionsForReview; @@ -92,7 +94,10 @@ static bool addRejection(TypeDatabase *database, const QHash<QString, QString> & static const AttributeMatchTypePair attributeMatchTypeMapping[] = {{functionNameAttribute(), TypeRejection::Function}, {fieldNameAttribute(), TypeRejection::Field}, - {enumNameAttribute(), TypeRejection::Enum}}; + {enumNameAttribute(), TypeRejection::Enum}, + {argumentTypeAttribute(), TypeRejection::ArgumentType}, + {returnTypeAttribute(), TypeRejection::ReturnType} + }; // Search for non-empty attribute (function, field, enum) const auto aend = attributes.cend(); @@ -1254,6 +1259,8 @@ bool Handler::startElement(const QStringRef &n, const QXmlStreamAttributes &atts attributes.insert(functionNameAttribute(), QString()); attributes.insert(fieldNameAttribute(), QString()); attributes.insert(enumNameAttribute(), QString()); + attributes.insert(argumentTypeAttribute(), QString()); + attributes.insert(returnTypeAttribute(), QString()); break; case StackElement::Removal: attributes.insert(QLatin1String("class"), QLatin1String("all")); |