aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlpropertycachecreator_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2019-07-05 10:04:08 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2019-07-08 14:43:00 +0200
commitb4d4e077340e7a1c031be15415410c20adc74887 (patch)
tree54d234d205ecf46d2fb50d3516c91b3df1bec22d /src/qml/qml/qqmlpropertycachecreator_p.h
parent7811d69006d298dcbe2abff874b02dfa80d8bf80 (diff)
Centralize property & signal parameter type handling at compilation time
Collect all that code in the Parameter class, which allows for future re-use for function parameters and return types. Change-Id: Ib9dfec9313dc3938634f9ce3a2e5a3a59a7135d9 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlpropertycachecreator_p.h')
-rw-r--r--src/qml/qml/qqmlpropertycachecreator_p.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/qml/qml/qqmlpropertycachecreator_p.h b/src/qml/qml/qqmlpropertycachecreator_p.h
index b29f14ff4a..54455fb560 100644
--- a/src/qml/qml/qqmlpropertycachecreator_p.h
+++ b/src/qml/qml/qqmlpropertycachecreator_p.h
@@ -414,12 +414,13 @@ inline QQmlJS::DiagnosticMessage QQmlPropertyCacheCreator<ObjectContainer>::crea
auto end = s->parametersEnd();
for ( ; param != end; ++param, ++i) {
names.append(stringAt(param->nameIndex).toUtf8());
- if (param->indexIsBuiltinType) {
+ const auto &type = param->type;
+ if (type.indexIsBuiltinType) {
// built-in type
- paramTypes[i + 1] = metaTypeForPropertyType(static_cast<QV4::CompiledData::BuiltinType>(int(param->typeNameIndexOrBuiltinType)));
+ paramTypes[i + 1] = metaTypeForPropertyType(static_cast<QV4::CompiledData::BuiltinType>(int(type.typeNameIndexOrBuiltinType)));
} else {
// lazily resolved type
- const QString customTypeName = stringAt(param->typeNameIndexOrBuiltinType);
+ const QString customTypeName = stringAt(type.typeNameIndexOrBuiltinType);
QQmlType qmltype;
if (!imports->resolveType(customTypeName, &qmltype, nullptr, nullptr, nullptr))
return qQmlCompileError(s->location, QQmlPropertyCacheCreatorBase::tr("Invalid signal parameter type: %1").arg(customTypeName));