summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2011-05-30 11:23:00 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2011-05-30 11:43:48 (GMT)
commit20dbb967f030041d1dc94b989b0b085ca84baa33 (patch)
tree3bc229cf658f112d2db6a6b786bb62498c7a2f8d
parent8fb90ce32dde5d4045c23ff44f29d19054db0d9b (diff)
downloadQt-20dbb967f030041d1dc94b989b0b085ca84baa33.zip
Qt-20dbb967f030041d1dc94b989b0b085ca84baa33.tar.gz
Qt-20dbb967f030041d1dc94b989b0b085ca84baa33.tar.bz2
Fix QHeaderView test case for VGA Symbian devices.
Minimum section size is bigger than expected in VGA devices, which was not taken into accound in two test cases. Task-number: QT-5049 Reviewed-by: Sami Merila
-rw-r--r--tests/auto/qheaderview/tst_qheaderview.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/auto/qheaderview/tst_qheaderview.cpp b/tests/auto/qheaderview/tst_qheaderview.cpp
index 3a659aa..52eeee4 100644
--- a/tests/auto/qheaderview/tst_qheaderview.cpp
+++ b/tests/auto/qheaderview/tst_qheaderview.cpp
@@ -563,7 +563,7 @@ void tst_QHeaderView::sectionSize()
QFETCH(int, lastVisibleSectionSize);
QFETCH(int, persistentSectionSize);
-#ifdef Q_OS_WINCE
+#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
// We test on a device with doubled pixels. Therefore we need to specify
// different boundaries.
initialDefaultSize = qMax(view->minimumSectionSize(), 30);
@@ -676,6 +676,16 @@ void tst_QHeaderView::visualIndexAt()
QFETCH(QList<int>, coordinate);
QFETCH(QList<int>, visual);
+#ifdef Q_OS_SYMBIAN
+ // Some Symbian devices have larger minimum section size than what is expected.
+ // Need to do this here instead of visualIndexAt_data() as view pointer doesn't
+ // seem to be valid there.
+ int minSize = view->minimumSectionSize();
+ if (minSize > 30) {
+ coordinate.clear();
+ coordinate << -1 << 0 << minSize + 1 << (minSize * 3) + 1 << 99999;
+ }
+#endif
view->setStretchLastSection(true);
topLevel->show();