diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-11-03 05:43:56 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-11-03 05:43:56 (GMT) |
commit | 36420993cb7572fa630ac88cdd6afefa2ab1c660 (patch) | |
tree | c70a11a4898cb7f9d640af58ef43c31ff212414d /src | |
parent | ea926d74dff5ce9fe2cfff1c27581a24e0976fd2 (diff) | |
download | Qt-36420993cb7572fa630ac88cdd6afefa2ab1c660.zip Qt-36420993cb7572fa630ac88cdd6afefa2ab1c660.tar.gz Qt-36420993cb7572fa630ac88cdd6afefa2ab1c660.tar.bz2 |
More QmlContext tests
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/qml/qmlcontext.cpp | 16 | ||||
-rw-r--r-- | src/declarative/qml/qmlcontext_p.h | 3 |
2 files changed, 2 insertions, 17 deletions
diff --git a/src/declarative/qml/qmlcontext.cpp b/src/declarative/qml/qmlcontext.cpp index d37d959..f8e685a 100644 --- a/src/declarative/qml/qmlcontext.cpp +++ b/src/declarative/qml/qmlcontext.cpp @@ -88,18 +88,6 @@ void QmlContextPrivate::addScript(const QString &script, QObject *scopeObject, scripts.append(scope); } -void QmlContextPrivate::dump() -{ - dump(0); -} - -void QmlContextPrivate::dump(int depth) -{ - QByteArray ba(depth * 4, ' '); - if (parent) - parent->d_func()->dump(depth + 1); -} - void QmlContextPrivate::destroyed(ContextGuard *guard) { Q_Q(QmlContext); @@ -382,8 +370,8 @@ void QmlContext::setContextProperty(const QString &name, const QVariant &value) if (d->notifyIndex == -1) d->notifyIndex = this->metaObject()->methodCount(); - if (QmlMetaType::isObject(value.userType())) { - QObject *o = QmlMetaType::toQObject(value); + if (d->engine && QmlEnginePrivate::get(d->engine)->isObject(value.userType())) { + QObject *o = *(QObject **)value.constData(); setContextProperty(name, o); } else { diff --git a/src/declarative/qml/qmlcontext_p.h b/src/declarative/qml/qmlcontext_p.h index cc8fcc6..7f9be0f 100644 --- a/src/declarative/qml/qmlcontext_p.h +++ b/src/declarative/qml/qmlcontext_p.h @@ -101,9 +101,6 @@ public: void init(); - void dump(); - void dump(int depth); - void invalidateEngines(); void refreshExpressions(); QSet<QmlContext *> childContexts; |