aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicktableview/data
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2018-08-06 11:22:57 +0200
committerRichard Moe Gustavsen <richard.gustavsen@qt.io>2018-08-07 21:17:17 +0000
commit13ea1d89f2bc35b878dde10a89dc186d8d0cd8e7 (patch)
tree43fdaeadb043001f23d890341a90e2f7b4432f68 /tests/auto/quick/qquicktableview/data
parent1b493d992c1876f280e2cade5ea4a92bd4acbf38 (diff)
QQuickTableView: improve draining of reuse pool
It turns out that using a maxTime of 2 when draining the pool was a bit naive. If e.g the width of the table is greater than the height, it starts releasing pooled items to quickly. So change the logic to be more dynamic, and to calculate what the maxTime should be based on the geometry of the table. Change-Id: Ifeed62789575f98cff063f550f45eb54ef312fdb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto/quick/qquicktableview/data')
-rw-r--r--tests/auto/quick/qquicktableview/data/countingtableview.qml7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/auto/quick/qquicktableview/data/countingtableview.qml b/tests/auto/quick/qquicktableview/data/countingtableview.qml
index c736d570b8..73fe4a80da 100644
--- a/tests/auto/quick/qquicktableview/data/countingtableview.qml
+++ b/tests/auto/quick/qquicktableview/data/countingtableview.qml
@@ -55,6 +55,9 @@ Item {
// delegatesCreatedCount is the number of items created during the lifetime of the test
property int delegatesCreatedCount: 0
+ property real delegateWidth: 100
+ property real delegateHeight: 50
+
TableView {
id: tableView
width: 600
@@ -69,8 +72,8 @@ Item {
id: tableViewDelegate
Rectangle {
objectName: "tableViewDelegate"
- implicitWidth: 100
- implicitHeight: 50
+ implicitWidth: delegateWidth
+ implicitHeight: delegateHeight
color: "lightgray"
border.width: 1