diff options
Diffstat (limited to 'src/qml/jsruntime/qv4engine.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4engine.cpp | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index 5f59e1e809..5521633db7 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -758,27 +758,6 @@ QObject *ExecutionEngine::qmlScopeObject() const return ctx->qml()->scopeObject; } -ReturnedValue ExecutionEngine::qmlSingletonWrapper(String *name) -{ - QQmlContextData *ctx = callingQmlContext(); - if (!ctx->imports) - return Encode::undefined(); - // Search for attached properties, enums and imported scripts - QQmlTypeNameCache::Result r = ctx->imports->query(name); - - Q_ASSERT(r.isValid()); - Q_ASSERT(r.type.isValid()); - Q_ASSERT(r.type.isSingleton()); - - QQmlType::SingletonInstanceInfo *siinfo = r.type.singletonInstanceInfo(); - QQmlEngine *e = qmlEngine(); - siinfo->init(e); - - if (QObject *qobjectSingleton = siinfo->qobjectApi(e)) - return QV4::QObjectWrapper::wrap(this, qobjectSingleton); - return QJSValuePrivate::convertedToValue(this, siinfo->scriptApi(e)); -} - QQmlContextData *ExecutionEngine::callingQmlContext() const { Heap::QmlContext *ctx = qmlContext(); |