aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/typesystemparser.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-11-19 14:13:05 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-11-19 13:45:32 +0000
commit666a3522b3054c4721d7f61b3612ce6c0fc3705b (patch)
tree944dea2d76c48e3d4e344432adc279a8358f4a39 /sources/shiboken6/ApiExtractor/typesystemparser.cpp
parent64a197d5cb84d15ba5eb739901344c8513dec7ec (diff)
shiboken6: Remove need to repeat signature when modifying a global function
Grab the signature from the top element. Fixes: PYSIDE-1424 Change-Id: Ife5178e1f30ed4ebd4420f31a608bed291966aa0 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/typesystemparser.cpp')
-rw-r--r--sources/shiboken6/ApiExtractor/typesystemparser.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/sources/shiboken6/ApiExtractor/typesystemparser.cpp b/sources/shiboken6/ApiExtractor/typesystemparser.cpp
index 530be15ab..d71029a03 100644
--- a/sources/shiboken6/ApiExtractor/typesystemparser.cpp
+++ b/sources/shiboken6/ApiExtractor/typesystemparser.cpp
@@ -2357,6 +2357,12 @@ bool TypeSystemParser::parseModifyFunction(const QXmlStreamReader &reader,
}
}
+ // Child of global <function>
+ if (originalSignature.isEmpty() && topElement.entry->isFunction()) {
+ auto f = static_cast<const FunctionTypeEntry *>(topElement.entry);
+ originalSignature = f->signatures().value(0);
+ }
+
const QString signature = TypeDatabase::normalizedSignature(originalSignature);
if (signature.isEmpty()) {
m_error = QLatin1String("No signature for modified function");