aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/qqmlengine.cpp')
-rw-r--r--src/qml/qml/qqmlengine.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index 8e3b0a790f..02e206284b 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -134,21 +134,21 @@ int qmlRegisterUncreatableMetaObject(const QMetaObject &staticMetaObject,
0,
0,
0,
- Q_NULLPTR,
+ nullptr,
reason,
uri, versionMajor, versionMinor, qmlName, &staticMetaObject,
QQmlAttachedPropertiesFunc(),
- Q_NULLPTR,
+ nullptr,
0,
0,
0,
- Q_NULLPTR, Q_NULLPTR,
+ nullptr, nullptr,
- Q_NULLPTR,
+ nullptr,
0
};
@@ -670,7 +670,7 @@ the same object as is returned from the Qt.include() call.
QQmlEnginePrivate::QQmlEnginePrivate(QQmlEngine *e)
: propertyCapture(0), rootContext(0),
-#ifndef QT_NO_QML_DEBUGGER
+#if QT_CONFIG(qml_debug)
profiler(0),
#endif
outputWarningsToMsgLog(true),
@@ -714,7 +714,7 @@ QQmlEnginePrivate::~QQmlEnginePrivate()
QMetaType::unregisterType(iter.value()->metaTypeId);
QMetaType::unregisterType(iter.value()->listMetaTypeId);
}
-#ifndef QT_NO_QML_DEBUGGER
+#if QT_CONFIG(qml_debug)
delete profiler;
#endif
}
@@ -2080,7 +2080,7 @@ void QQmlEnginePrivate::cleanupScarceResources()
// note that the actual SRD is owned by the JS engine,
// so we cannot delete the SRD; but we can free the
// memory used by the variant in the SRD.
- QV4::ExecutionEngine *engine = QV8Engine::getV4(v8engine());
+ QV4::ExecutionEngine *engine = v4engine();
while (QV4::ExecutionEngine::ScarceResourceData *sr = engine->scarceResources.first()) {
sr->data = QVariant();
engine->scarceResources.remove(sr);
@@ -2342,7 +2342,7 @@ QQmlPropertyCache *QQmlEnginePrivate::propertyCacheForType(int t)
}
}
-QQmlPropertyCache *QQmlEnginePrivate::rawPropertyCacheForType(int t)
+QQmlPropertyCache *QQmlEnginePrivate::rawPropertyCacheForType(int t, int minorVersion)
{
Locker locker(this);
auto iter = m_compositeTypes.constFind(t);
@@ -2351,7 +2351,11 @@ QQmlPropertyCache *QQmlEnginePrivate::rawPropertyCacheForType(int t)
} else {
QQmlType type = QQmlMetaType::qmlType(t);
locker.unlock();
- return type.isValid() ? cache(type.baseMetaObject()) : 0;
+
+ if (minorVersion >= 0)
+ return type.isValid() ? cache(type, minorVersion) : 0;
+ else
+ return type.isValid() ? cache(type.baseMetaObject()) : 0;
}
}