diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-05-08 14:02:11 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2013-05-08 15:30:56 +0200 |
commit | 1d3ce5238cf643c219ea2a9d44287052e765ac83 (patch) | |
tree | a1fd0170afc4eb1de423814826542b89339affb9 /src/quick/items/qquickloader.cpp | |
parent | 4a3e67d4701b426aa72a6a6ae2bd62d50e791869 (diff) |
Remove v8::Persistent usage from qquickloader
Change-Id: I0a7ffdc3ed159ec8f506cadc73ba8ae77c003a41
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/quick/items/qquickloader.cpp')
-rw-r--r-- | src/quick/items/qquickloader.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/quick/items/qquickloader.cpp b/src/quick/items/qquickloader.cpp index e638346d91..8836df5c08 100644 --- a/src/quick/items/qquickloader.cpp +++ b/src/quick/items/qquickloader.cpp @@ -579,8 +579,8 @@ void QQuickLoader::setSource(QQmlV8Function *args) QUrl sourceUrl = d->resolveSourceUrl(args); if (!ipv.IsEmpty()) { d->disposeInitialPropertyValues(); - d->initialPropertyValues = qPersistentNew(ipv); - d->qmlGlobalForIpv = qPersistentNew(args->qmlGlobal()); + d->initialPropertyValues = ipv->v4Value(); + d->qmlGlobalForIpv = args->qmlGlobal()->v4Value(); } setSource(sourceUrl, false); // already cleared and set ipv above. @@ -588,10 +588,6 @@ void QQuickLoader::setSource(QQmlV8Function *args) void QQuickLoaderPrivate::disposeInitialPropertyValues() { - if (!initialPropertyValues.IsEmpty()) - qPersistentDispose(initialPropertyValues); - if (!qmlGlobalForIpv.IsEmpty()) - qPersistentDispose(qmlGlobalForIpv); } void QQuickLoaderPrivate::load() @@ -645,12 +641,12 @@ void QQuickLoaderPrivate::setInitialState(QObject *obj) itemContext = 0; } - if (initialPropertyValues.IsEmpty()) + if (initialPropertyValues.isEmpty()) return; QQmlComponentPrivate *d = QQmlComponentPrivate::get(component); Q_ASSERT(d && d->engine); - d->initializeObjectWithInitialProperties(qmlGlobalForIpv, initialPropertyValues, obj); + d->initializeObjectWithInitialProperties(qmlGlobalForIpv.value(), initialPropertyValues.value(), obj); } void QQuickLoaderIncubator::statusChanged(Status status) |