diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-10-06 01:26:23 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-10-06 01:26:23 (GMT) |
commit | bb8ba98542e1ed363d4218b9a9a4e68a6c4b5337 (patch) | |
tree | 613c4221486656e0fd309afda56d72e46ec89b20 /src | |
parent | 47284ca360c1875663207996740bf6ed6e93d364 (diff) | |
download | Qt-bb8ba98542e1ed363d4218b9a9a4e68a6c4b5337.zip Qt-bb8ba98542e1ed363d4218b9a9a4e68a6c4b5337.tar.gz Qt-bb8ba98542e1ed363d4218b9a9a4e68a6c4b5337.tar.bz2 |
Create Loader components in correct context
Task-number: QTBUG-13481
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativeloader.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeloader.cpp b/src/declarative/graphicsitems/qdeclarativeloader.cpp index 1066c2b..5647b14 100644 --- a/src/declarative/graphicsitems/qdeclarativeloader.cpp +++ b/src/declarative/graphicsitems/qdeclarativeloader.cpp @@ -337,7 +337,9 @@ void QDeclarativeLoaderPrivate::_q_sourceLoaded() return; } - QDeclarativeContext *ctxt = new QDeclarativeContext(qmlContext(q)); + QDeclarativeContext *creationContext = component->creationContext(); + if (!creationContext) creationContext = qmlContext(q); + QDeclarativeContext *ctxt = new QDeclarativeContext(creationContext); ctxt->setContextObject(q); QDeclarativeComponent *c = component; |