diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2009-11-05 08:28:31 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2009-11-05 08:28:31 (GMT) |
commit | cf1f8532934cefb15cc76ef355706e9909527632 (patch) | |
tree | 1a3b2011206fee23253265b89cbbcad5cf942174 | |
parent | 9bb160d8cee882bec25d7654a4d0554a755265c5 (diff) | |
parent | 5cd33a36efdcd8ee2a50d6d362c2523b4a942529 (diff) | |
download | Qt-cf1f8532934cefb15cc76ef355706e9909527632.zip Qt-cf1f8532934cefb15cc76ef355706e9909527632.tar.gz Qt-cf1f8532934cefb15cc76ef355706e9909527632.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
-rw-r--r-- | src/declarative/graphicsitems/qmlgraphicslistview.cpp | 4 | ||||
-rw-r--r-- | tests/auto/declarative/listview/tst_listview.cpp | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicslistview.cpp b/src/declarative/graphicsitems/qmlgraphicslistview.cpp index f9d4190..1f5d51d 100644 --- a/src/declarative/graphicsitems/qmlgraphicslistview.cpp +++ b/src/declarative/graphicsitems/qmlgraphicslistview.cpp @@ -1461,6 +1461,10 @@ void QmlGraphicsListView::setSectionExpression(const QString &expression) } } +/*! + \qmlproperty string ListView::currentSection + This property holds the section that is currently at the beginning of the view. +*/ QString QmlGraphicsListView::currentSection() const { Q_D(const QmlGraphicsListView); diff --git a/tests/auto/declarative/listview/tst_listview.cpp b/tests/auto/declarative/listview/tst_listview.cpp index b8f87b7..5575ace 100644 --- a/tests/auto/declarative/listview/tst_listview.cpp +++ b/tests/auto/declarative/listview/tst_listview.cpp @@ -671,6 +671,7 @@ void tst_QmlGraphicsListView::spacing() } listview->setSpacing(10); + QVERIFY(listview->spacing() == 10); // Confirm items positioned correctly itemCount = findItems<QmlGraphicsItem>(viewport, "wrapper").count(); @@ -723,6 +724,11 @@ void tst_QmlGraphicsListView::sections() QCOMPARE(item->y(), qreal(i*20 + ((i+4)/5) * 20)); } + QVERIFY(listview->currentSection() == "0"); + + listview->setViewportY(140); + QVERIFY(listview->currentSection() == "1"); + delete canvas; } |