diff options
author | Paolo Angelelli <paolo.angelelli@theqtcompany.com> | 2016-06-09 14:18:13 +0200 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@theqtcompany.com> | 2016-06-24 13:34:09 +0000 |
commit | 93e4645cde4ad8ca00c2bcdacd6150d80f81bc1c (patch) | |
tree | b6873552fd5b8bd8e7640fbd38a5299b5f86895e /tests | |
parent | fd7f6a0ebbda77d3db563515d35124b113df9261 (diff) | |
download | qtlocation-93e4645cde4ad8ca00c2bcdacd6150d80f81bc1c.tar.gz |
Delay removal/readd of map items until incubation completion on reset
When the model is reset, QDeclarativeGeoMapItemView currently removes
all map items and then begins recreating new delegates for model items.
This causes flickering since the mapitems are removed at once, but
the repopulation is asynchronous and allows the scene graph to repaint
in the meanwhile.
This patch delays the removal of current map items until all the new
items have been all incubated, so that removal and readd happen at
the same point.
The patch also adds additional checks to methods like
itemModelRowsRemoved, to verify if an item is still incubating.
Task-number: QTBUG-52301
Task-number: QTBUG-54188
Change-Id: I2f27114c3898bd61b1282b1f27b5f062bed1fe35
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/declarative_ui/tst_map_itemview.qml | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/declarative_ui/tst_map_itemview.qml b/tests/auto/declarative_ui/tst_map_itemview.qml index 5fe00d97..25853835 100644 --- a/tests/auto/declarative_ui/tst_map_itemview.qml +++ b/tests/auto/declarative_ui/tst_map_itemview.qml @@ -398,6 +398,8 @@ Item { tryCompare(mapForView, "mapItemsLength", 7) testModel.datacount += 2 testModel2.datacount += 1 + // delegate spawning is async. wait a bit. + wait(1) tryCompare(mapForView, "mapItemsLength", 9) theItemView.model = testModel |