summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2012-04-12 14:55:36 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-04-13 22:34:25 (GMT)
commitb84e033f2e77d108da413c00ee3d9f1636e8ad5b (patch)
tree86641793ab602b7dd25a06c5bcbb67eba7e033aa /tests
parent8f0b5470a96b342faa96ebe133dce5dc679f13b7 (diff)
downloadQt-b84e033f2e77d108da413c00ee3d9f1636e8ad5b.zip
Qt-b84e033f2e77d108da413c00ee3d9f1636e8ad5b.tar.gz
Qt-b84e033f2e77d108da413c00ee3d9f1636e8ad5b.tar.bz2
Fix out of bounds use of QVector API.
This is a regression introduced by commit d63910575949106f84dacf04abaa14fc866aa66b. Task-number: QTBUG-24965 Task-number: QTBUG-25140 Change-Id: Ice9d90ebb81dcc3c0bc166eeb8f77a0ad9d99476 Reviewed-by: David Faure <faure@kde.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qtreeview/tst_qtreeview.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qtreeview/tst_qtreeview.cpp b/tests/auto/qtreeview/tst_qtreeview.cpp
index d19f93f..05b2e3c 100644
--- a/tests/auto/qtreeview/tst_qtreeview.cpp
+++ b/tests/auto/qtreeview/tst_qtreeview.cpp
@@ -3001,6 +3001,16 @@ void tst_QTreeView::styleOptionViewItem()
view.setFirstColumnSpanned(2, QModelIndex(), true);
view.setAlternatingRowColors(true);
+ {
+ // Test the rendering to pixmap before painting the widget.
+ // The rendering to pixmap should not depend on having been
+ // painted already yet.
+ QItemSelection sel(model.index(0,0), model.index(0,modelColumns-1));
+ QRect rect;
+ view.aiv_priv()->renderToPixmap(sel.indexes(), &rect);
+ QTRY_VERIFY(delegate.count == visibleColumns);
+ }
+
delegate.count = 0;
delegate.allCollapsed = true;
view.showMaximized();