diff options
Diffstat (limited to 'src/qml/qml/qqmlmetatype.cpp')
-rw-r--r-- | src/qml/qml/qqmlmetatype.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/qml/qml/qqmlmetatype.cpp b/src/qml/qml/qqmlmetatype.cpp index 0f388cf7b7..e696dc0362 100644 --- a/src/qml/qml/qqmlmetatype.cpp +++ b/src/qml/qml/qqmlmetatype.cpp @@ -235,7 +235,7 @@ public: struct PropertyCacheByMinorVersion { - PropertyCacheByMinorVersion() : cache(Q_NULLPTR), minorVersion(-1) {} + PropertyCacheByMinorVersion() : cache(nullptr), minorVersion(-1) {} explicit PropertyCacheByMinorVersion(QQmlPropertyCache *pc, int ver) : cache(pc), minorVersion(ver) {} QQmlPropertyCachePtr cache; int minorVersion; @@ -260,8 +260,6 @@ void QQmlMetaTypeData::registerType(QQmlTypePrivate *priv) void QQmlType::SingletonInstanceInfo::init(QQmlEngine *e) { - QV4::ExecutionEngine *v4 = QV8Engine::getV4(e->handle()); - v4->pushGlobalContext(); if (scriptCallback && scriptApi(e).isUndefined()) { setScriptApi(e, scriptCallback(e, e)); } else if (qobjectCallback && !qobjectApi(e)) { @@ -279,7 +277,6 @@ void QQmlType::SingletonInstanceInfo::init(QQmlEngine *e) if (o) component.completeCreate(); } - v4->popContext(); } void QQmlType::SingletonInstanceInfo::destroy(QQmlEngine *e) @@ -842,7 +839,7 @@ QQmlPropertyCache *QQmlTypePrivate::propertyCacheForMinorVersion(int minorVersio for (int i = 0; i < propertyCaches.count(); ++i) if (propertyCaches.at(i).minorVersion == minorVersion) return propertyCaches.at(i).cache; - return Q_NULLPTR; + return nullptr; } void QQmlTypePrivate::setPropertyCacheForMinorVersion(int minorVersion, QQmlPropertyCache *cache) @@ -2444,7 +2441,7 @@ void QQmlMetaType::freeUnusedTypesAndCaches() while (it != data->propertyCaches.end()) { if ((*it)->count() == 1) { - QQmlPropertyCache *pc = Q_NULLPTR; + QQmlPropertyCache *pc = nullptr; qSwap(pc, *it); it = data->propertyCaches.erase(it); pc->release(); |