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>
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);