diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-08-02 15:17:01 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-08-29 13:46:31 +0000 |
commit | 1a3afc7549238463a35d374eaed96410cf76bfb8 (patch) | |
tree | 2dfd663e0062df7455408d2c516c8091f3f545f7 /sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp | |
parent | 31872c5c71bf48193744a547b3e2e753f83d5b0b (diff) |
FunctionModification: Make it possible to specify a regular expression
It should make it easier to specify the <array> modifications
for GL functions.
Task-number: PYSIDE-516
Change-Id: Ieb2e540f61785d13ee46a196a18d03b311d308e1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp')
-rw-r--r-- | sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp b/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp index 5b606e063..64c482c54 100644 --- a/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp +++ b/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp @@ -179,7 +179,7 @@ void AbstractMetaBuilderPrivate::checkFunctionModifications() FunctionModificationList modifications = centry->functionModifications(); for (const FunctionModification &modification : qAsConst(modifications)) { - QString signature = modification.signature; + QString signature = modification.signature(); QString name = signature.trimmed(); name.truncate(name.indexOf(QLatin1Char('('))); @@ -192,7 +192,8 @@ void AbstractMetaBuilderPrivate::checkFunctionModifications() bool found = false; QStringList possibleSignatures; for (AbstractMetaFunction *function : functions) { - if (function->minimalSignature() == signature && function->implementingClass() == clazz) { + if (function->implementingClass() == clazz + && modification.matches(function->minimalSignature())) { found = true; break; } @@ -3122,7 +3123,7 @@ bool AbstractMetaBuilderPrivate::inheritTemplate(AbstractMetaClass *subclass, FunctionModificationList mods = function->modifications(templateClass); for (int i = 0; i < mods.size(); ++i) { FunctionModification mod = mods.at(i); - mod.signature = f->minimalSignature(); + mod.setSignature(f->minimalSignature()); // If we ever need it... Below is the code to do // substitution of the template instantation type inside |