summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-06-03 05:27:23 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-06-03 05:27:23 (GMT)
commit79742b14982004ac1b77558e6ab6b649898336c7 (patch)
treed2a2445ff337a6d7c98175685062a005f8c82915 /tests/auto
parent09df797da66a5c3a82d4405a638d4dc46de84a6f (diff)
downloadQt-79742b14982004ac1b77558e6ab6b649898336c7.zip
Qt-79742b14982004ac1b77558e6ab6b649898336c7.tar.gz
Qt-79742b14982004ac1b77558e6ab6b649898336c7.tar.bz2
Add header and footer to GridView
Also document them for both ListView and GridView Task-number: QTBUG-11191
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
index 2db3ee6..fb09d39 100644
--- a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
+++ b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
@@ -833,21 +833,34 @@ void tst_QDeclarativeGridView::componentChanges()
QSignalSpy highlightSpy(gridView, SIGNAL(highlightChanged()));
QSignalSpy delegateSpy(gridView, SIGNAL(delegateChanged()));
+ QSignalSpy headerSpy(gridView, SIGNAL(headerChanged()));
+ QSignalSpy footerSpy(gridView, SIGNAL(footerChanged()));
gridView->setHighlight(&component);
gridView->setDelegate(&delegateComponent);
+ gridView->setHeader(&component);
+ gridView->setFooter(&component);
QTRY_COMPARE(gridView->highlight(), &component);
QTRY_COMPARE(gridView->delegate(), &delegateComponent);
+ QTRY_COMPARE(gridView->header(), &component);
+ QTRY_COMPARE(gridView->footer(), &component);
QTRY_COMPARE(highlightSpy.count(),1);
QTRY_COMPARE(delegateSpy.count(),1);
+ QTRY_COMPARE(headerSpy.count(),1);
+ QTRY_COMPARE(footerSpy.count(),1);
gridView->setHighlight(&component);
gridView->setDelegate(&delegateComponent);
+ gridView->setHeader(&component);
+ gridView->setFooter(&component);
QTRY_COMPARE(highlightSpy.count(),1);
QTRY_COMPARE(delegateSpy.count(),1);
+ QTRY_COMPARE(headerSpy.count(),1);
+ QTRY_COMPARE(footerSpy.count(),1);
+
delete canvas;
}