Repair tst_qtreeview on Android

Scroll tests relied on having a small window. On Android, the
window can not be smaller than the screen.
This patch changes the tests so that the windows have large
enough content so scrolling can happen.

Fixes: QTBUG-87408
Pick-to: 6.2 6.3
Change-Id: I26a444518fd934527089297c594673937f0ecf88
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
Andreas Buhr 2022-02-15 17:11:26 +01:00
parent 2ed3cc8e7a
commit eb628794c7
2 changed files with 3 additions and 8 deletions

View File

@ -1,5 +0,0 @@
# QTBUG-87408
[horizontalScrollMode]
android
[setSelection]
android

View File

@ -890,8 +890,8 @@ void tst_QTreeView::horizontalScrollMode()
QTreeView view;
setFrameless(&view);
view.setModel(&model);
view.setFixedSize(100, 100);
view.header()->resizeSection(0, 200);
view.setFixedSize(100, 1000);
view.header()->resizeSection(0, 2000);
view.show();
QCOMPARE(view.horizontalScrollMode(), QAbstractItemView::ScrollPerPixel);
@ -2050,7 +2050,7 @@ void tst_QTreeView::setSelection()
QFETCH(PointList, expectedItems);
QFETCH(int, verticalOffset);
QtTestModel model(10, 5);
QtTestModel model(100, 5);
model.levels = 1;
model.setDecorationsEnabled(true);
QTreeView view;