summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativelistview
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-10-13 03:03:53 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-10-13 03:03:53 (GMT)
commit0cb76050ce08fec0046e15660fde39dbe102810c (patch)
tree940ea6a02354342ee037c30be675dc31d2c652bd /tests/auto/declarative/qdeclarativelistview
parent1a9037333214a898588d39fd2ae087bca5ff3b53 (diff)
parenta311b854e0886f0498c068af5b489af36a96b845 (diff)
downloadQt-0cb76050ce08fec0046e15660fde39dbe102810c.zip
Qt-0cb76050ce08fec0046e15660fde39dbe102810c.tar.gz
Qt-0cb76050ce08fec0046e15660fde39dbe102810c.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (26 commits) Compile on WinCE Update QtDeclarative def files Update QtCore def files Compile on MSVC2008 Bug: TextEdit ignores plain text format when pasting text Update sections if model content changes. Fix autotest on windows Test for absent qmldir Allow objectName to be used in QML bindings Install the declarative objectNameChanged callback Don't give focus to a FocusScope that has had focus explicitly cleared. Add a declarative callback for when a QObject's objectName changes Ensure GridView header is visible at the top of the view. Allow aliases to value type properties Image.sourceSize is incorrect after changing Image.source Test for QTBUG-13685 Don't forward keys to invisible items. Disable Text {} image caching by default Check plugin and QML file case on Mac and Windows Add test for QTBUG-14279 ...
Diffstat (limited to 'tests/auto/declarative/qdeclarativelistview')
-rw-r--r--tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
index 6452bae..7a58773 100644
--- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
+++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
@@ -937,6 +937,8 @@ void tst_QDeclarativeListView::sections()
QCOMPARE(next->text().toInt(), (i+1)/5);
}
+ QSignalSpy currentSectionChangedSpy(listview, SIGNAL(currentSectionChanged()));
+
// Remove section boundary
model.removeItem(5);
@@ -972,13 +974,28 @@ void tst_QDeclarativeListView::sections()
listview->setContentY(140);
QTRY_COMPARE(listview->currentSection(), QString("1"));
+ QTRY_COMPARE(currentSectionChangedSpy.count(), 1);
+
listview->setContentY(20);
QTRY_COMPARE(listview->currentSection(), QString("0"));
+ QTRY_COMPARE(currentSectionChangedSpy.count(), 2);
+
item = findItem<QDeclarativeItem>(contentItem, "wrapper", 1);
QTRY_VERIFY(item);
QTRY_COMPARE(item->height(), 20.0);
+ // check that headers change when item changes
+ listview->setContentY(0);
+ model.modifyItem(0, "changed", "2");
+
+ canvas->show();
+ qApp->exec();
+
+ item = findItem<QDeclarativeItem>(contentItem, "wrapper", 1);
+ QTRY_VERIFY(item);
+ QTRY_COMPARE(item->height(), 40.0);
+
delete canvas;
}