aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2011-10-14 10:20:08 +1000
committerQt by Nokia <qt-info@nokia.com>2011-10-14 02:39:59 +0200
commit279ecc31ea551387589362035a0e4365f8179358 (patch)
treea2ab80006ce85104fbca2ac9f27b6f16a2189f1c /src
parent533eae0a6b2585997ded14ae0bb9af2e66cdd0ea (diff)
Fix creation context for delegates
As per cdf868033bbd7bf5a996c67fa56f8ac15e755115 for ListView and GridView. Change-Id: I6928a1fd4df51265124925530e81704dbdc5af46 Reviewed-on: http://codereview.qt-project.org/6629 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/declarative/items/qsgpathview.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/declarative/items/qsgpathview.cpp b/src/declarative/items/qsgpathview.cpp
index faa045a7c1..590fa93782 100644
--- a/src/declarative/items/qsgpathview.cpp
+++ b/src/declarative/items/qsgpathview.cpp
@@ -211,7 +211,9 @@ void QSGPathViewPrivate::createHighlight()
QSGItem *item = 0;
if (highlightComponent) {
- QDeclarativeContext *highlightContext = new QDeclarativeContext(qmlContext(q));
+ QDeclarativeContext *creationContext = highlightComponent->creationContext();
+ QDeclarativeContext *highlightContext = new QDeclarativeContext(
+ creationContext ? creationContext : qmlContext(q));
QObject *nobj = highlightComponent->create(highlightContext);
if (nobj) {
QDeclarative_setParent_noEvent(highlightContext, nobj);