diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2010-11-05 16:35:28 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2010-11-05 16:35:28 (GMT) |
commit | 58bac5551cbeed83a99e257226bb7b40d363bab9 (patch) | |
tree | 4c4f47fc20f53a29e4d5dcfa3e59b8e7d523dee3 /tests/auto/qlistwidget/tst_qlistwidget.cpp | |
parent | ebecf192abe56c405409343acc2f97eaf9124fc3 (diff) | |
parent | 60b09b8915e2095b221eb0a16a76d49e5bb10391 (diff) | |
download | Qt-58bac5551cbeed83a99e257226bb7b40d363bab9.zip Qt-58bac5551cbeed83a99e257226bb7b40d363bab9.tar.gz Qt-58bac5551cbeed83a99e257226bb7b40d363bab9.tar.bz2 |
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts:
mkspecs/features/symbian/symbian_building.prf
src/network/access/qhttpnetworkconnectionchannel.cpp
Diffstat (limited to 'tests/auto/qlistwidget/tst_qlistwidget.cpp')
-rw-r--r-- | tests/auto/qlistwidget/tst_qlistwidget.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/auto/qlistwidget/tst_qlistwidget.cpp b/tests/auto/qlistwidget/tst_qlistwidget.cpp index 8aa50d3..10f07c5 100644 --- a/tests/auto/qlistwidget/tst_qlistwidget.cpp +++ b/tests/auto/qlistwidget/tst_qlistwidget.cpp @@ -1500,6 +1500,11 @@ void tst_QListWidget::itemWidget() class MyListWidget : public QListWidget { public: + MyListWidget(QWidget *parent=0) + : QListWidget(parent) + { + } + void paintEvent(QPaintEvent *e) { painted += e->region(); QListWidget::paintEvent(e); @@ -1514,14 +1519,17 @@ void tst_QListWidget::fastScroll() QSKIP("S60 style doesn't support fast scrolling", SkipAll); } - MyListWidget widget; + QWidget topLevel; + MyListWidget widget(&topLevel); for (int i = 0; i < 50; ++i) widget.addItem(QString("Item %1").arg(i)); - widget.show(); + topLevel.resize(300, 300); // toplevel needs to be wide enough for the item + topLevel.show(); // Make sure the widget gets the first full repaint. On // some WMs, we'll get two (first inactive exposure, then // active exposure. + QTest::qWaitForWindowShown(&widget); #ifdef Q_WS_X11 qt_x11_wait_for_window_manager(&widget); #endif @@ -1532,6 +1540,7 @@ void tst_QListWidget::fastScroll() QVERIFY(!itemSize.isEmpty()); QScrollBar *sbar = widget.verticalScrollBar(); + widget.setVerticalScrollMode(QAbstractItemView::ScrollPerItem); widget.painted = QRegion(); sbar->setValue(sbar->value() + sbar->singleStep()); QApplication::processEvents(); |