summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-04-15 13:29:26 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-04-15 13:29:26 (GMT)
commit07f724cd5abd0548fb32ed3469bde113daf028c4 (patch)
treecbc086e99d0f59ccde3ac314d6165e7806fc613a /tests/auto
parentc5a0190054421ac5c3325bba6835b63c70b6bda2 (diff)
parentb53f7d4ce3d5d9af47daf78c9f831acc532e688b (diff)
downloadQt-07f724cd5abd0548fb32ed3469bde113daf028c4.zip
Qt-07f724cd5abd0548fb32ed3469bde113daf028c4.tar.gz
Qt-07f724cd5abd0548fb32ed3469bde113daf028c4.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: QListView: Re-fix scrollbar ranges Fix compile error with QT_NO_GRAPHICSVIEW in QtMultimedia Fix compile error with QT_NO_IMAGEFORMAT_XPM in QtGui Wrap EGL image function pointers and move into QEgl namespace Fix compilation of ShivaVG, which does not have EGL. Move nativePaintingActive flag to GL2 engine's private More adjustments to QTBUG-6800 Adjustments to QTBUG-6800 patch. QTBUG-6800 patch included, but only for OpenGL 2.0 Support building with desktop OpenGL managed via EGL Print more information when debugging X11 Visual selection Fix gcc compile warning in qstatictext.cpp Avoid taking sqrt of negative number in FT font engine
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qlistview/tst_qlistview.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/auto/qlistview/tst_qlistview.cpp b/tests/auto/qlistview/tst_qlistview.cpp
index d2181f8..f5c32cd 100644
--- a/tests/auto/qlistview/tst_qlistview.cpp
+++ b/tests/auto/qlistview/tst_qlistview.cpp
@@ -123,6 +123,7 @@ private slots:
void taskQTBUG_435_deselectOnViewportClick();
void taskQTBUG_2678_spacingAndWrappedText();
void taskQTBUG_5877_skippingItemInPageDownUp();
+ void taskQTBUG_9455_wrongScrollbarRanges();
};
// Testing get/set functions
@@ -1941,5 +1942,34 @@ void tst_QListView::taskQTBUG_5877_skippingItemInPageDownUp()
}
}
+class ListView_9455 : public QListView
+{
+public:
+ QSize contentsSize() const
+ {
+ return QListView::contentsSize();
+ }
+};
+
+void tst_QListView::taskQTBUG_9455_wrongScrollbarRanges()
+{
+ QStringList list;
+ const int nrItems = 8;
+ for (int i = 0; i < nrItems; i++)
+ list << QString().sprintf("item %d", i);
+
+ QStringListModel model(list);
+ ListView_9455 w;
+ w.setModel(&model);
+ w.setViewMode(QListView::IconMode);
+ w.resize(116, 132);
+ w.setMovement(QListView::Static);
+ const int spacing = 40;
+ w.setSpacing(spacing);
+ w.show();
+ QTest::qWaitForWindowShown(&w);
+ QCOMPARE(w.verticalScrollBar()->maximum(), w.contentsSize().height() - w.viewport()->geometry().height());
+}
+
QTEST_MAIN(tst_QListView)
#include "tst_qlistview.moc"