aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-06-19 10:55:11 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-06-19 10:56:21 +0200
commit14384c4436ae14016af50359ff9029cd939d2364 (patch)
treeb4ed8445f936dfc79d78bfe774927291dbc43868 /sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp
parent6c65516ca994e4fa024222e8861c8cb6fad41e48 (diff)
parentc0f118e4106b5d38cd828425b6533147f111cdd4 (diff)
Merge remote-tracking branch 'origin/5.13' into dev
Diffstat (limited to 'sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp')
-rw-r--r--sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp b/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp
index 6cb0d1fe5..c4f51737c 100644
--- a/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp
+++ b/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp
@@ -1616,11 +1616,11 @@ AbstractMetaFunction* AbstractMetaBuilderPrivate::traverseFunction(const AddedFu
metaFunction->setType(translateType(addedFunc->returnType()));
- QVector<AddedFunction::TypeInfo> args = addedFunc->arguments();
+ const auto &args = addedFunc->arguments();
AbstractMetaArgumentList metaArguments;
for (int i = 0; i < args.count(); ++i) {
- AddedFunction::TypeInfo& typeInfo = args[i];
+ const AddedFunction::TypeInfo& typeInfo = args.at(i).typeInfo;
AbstractMetaArgument *metaArg = new AbstractMetaArgument;
AbstractMetaType *type = translateType(typeInfo);
if (Q_UNLIKELY(!type)) {
@@ -1631,6 +1631,8 @@ AbstractMetaFunction* AbstractMetaBuilderPrivate::traverseFunction(const AddedFu
return nullptr;
}
type->decideUsagePattern();
+ if (!args.at(i).name.isEmpty())
+ metaArg->setName(args.at(i).name);
metaArg->setType(type);
metaArg->setArgumentIndex(i);
metaArg->setDefaultValueExpression(typeInfo.defaultValue);