aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlpropertycachecreator_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2019-07-04 11:29:56 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2019-07-05 16:30:29 +0200
commit5a699e1416efe6a304d52df61b1a9247b7c4b3ed (patch)
treeef186631f85e19cd990b4b70451b7b8eb925b22b /src/qml/qml/qqmlpropertycachecreator_p.h
parent5cab256d3df331ee0795a3f5f9bb70eb48f12795 (diff)
Reduce the size of signal parameters in qml cache data
We can reduce the distinction between a built-in type or a custom type down to a single bit. Change-Id: Ibe15d35357aa8c3948809f981221df29a40c400b 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, 3 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlpropertycachecreator_p.h b/src/qml/qml/qqmlpropertycachecreator_p.h
index e2dbea94e7..3871703ebb 100644
--- a/src/qml/qml/qqmlpropertycachecreator_p.h
+++ b/src/qml/qml/qqmlpropertycachecreator_p.h
@@ -429,13 +429,12 @@ inline QQmlJS::DiagnosticMessage QQmlPropertyCacheCreator<ObjectContainer>::crea
auto end = s->parametersEnd();
for ( ; param != end; ++param, ++i) {
names.append(stringAt(param->nameIndex).toUtf8());
- if (param->type < builtinTypeCount) {
+ if (param->indexIsBuiltinType) {
// built-in type
- paramTypes[i + 1] = builtinTypes[param->type].metaType;
+ paramTypes[i + 1] = builtinTypes[param->typeNameIndexOrBuiltinType].metaType;
} else {
// lazily resolved type
- Q_ASSERT(param->type == QV4::CompiledData::Property::Custom);
- const QString customTypeName = stringAt(param->customTypeNameIndex);
+ const QString customTypeName = stringAt(param->typeNameIndexOrBuiltinType);
QQmlType qmltype;
if (!imports->resolveType(customTypeName, &qmltype, nullptr, nullptr, nullptr))
return qQmlCompileError(s->location, QQmlPropertyCacheCreatorBase::tr("Invalid signal parameter type: %1").arg(customTypeName));