summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativelistview.cpp
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2011-02-09 08:21:30 (GMT)
committerBea Lam <bea.lam@nokia.com>2011-02-09 08:21:30 (GMT)
commit6129a16a74620916d3e8bff29a3788374ca21c94 (patch)
tree7f9960f986e822c897c6230c4a18f6b717ed7106 /src/declarative/graphicsitems/qdeclarativelistview.cpp
parent3ebbb660d6f0c29b438f49dc8187b1b353ee1b8a (diff)
parent1759f7d688903210a142d7f93a6d173c52995d2f (diff)
downloadQt-6129a16a74620916d3e8bff29a3788374ca21c94.zip
Qt-6129a16a74620916d3e8bff29a3788374ca21c94.tar.gz
Qt-6129a16a74620916d3e8bff29a3788374ca21c94.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Conflicts: tests/auto/declarative/qdeclarativemoduleplugin/qdeclarativemoduleplugin.pro Change-Id: I8da521f05ebc266d91caa582852155b571d5cc63
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativelistview.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index 74e9826..a60a4aa 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -413,8 +413,10 @@ public:
}
}
if ((header && header->item == item) || (footer && footer->item == item)) {
- updateHeader();
- updateFooter();
+ if (header)
+ updateHeader();
+ if (footer)
+ updateFooter();
}
if (currentItem && currentItem->item == item)
updateHighlight();
@@ -936,6 +938,9 @@ void QDeclarativeListViewPrivate::createSection(FxListItem *listItem)
}
}
listItem->setPosition(pos);
+ } else {
+ QDeclarativeContext *context = QDeclarativeEngine::contextForObject(listItem->section)->parentContext();
+ context->setContextProperty(QLatin1String("section"), listItem->attached->m_section);
}
} else if (listItem->section) {
qreal pos = listItem->position();