diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-04-21 10:34:03 +0200 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-04-22 09:05:04 +0200 |
commit | 28a31148ca02dbb530fd92dfafbcf71c64af4b70 (patch) | |
tree | 3779220bb6ae6a732ef3f8a65d031a1dd210af72 /tests/auto/quick/qquickrepeater/data | |
parent | ac3a6d9fb3caf19ec345f4eba8747149446c4f20 (diff) |
QQuickRepeater: Fix interaction with Package
Amends 3b806a18cc665b5ae0e12d45fe170bfc3f00352a.
Eric's change tried to tackle the issue by making the PartModel more
well-behaved. However, this still left some issues, as exhibited by the
linked bug. This time, we simply make the repeater more robust, and
setup d->deletables if it's not done yet.
Pick-to: 5.15
Fixes: QTBUG-71964
Change-Id: I58c80c84f73fddaea5d6030f92ffff219ecf2b71
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/quick/qquickrepeater/data')
-rw-r--r-- | tests/auto/quick/qquickrepeater/data/package2.qml | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickrepeater/data/package2.qml b/tests/auto/quick/qquickrepeater/data/package2.qml new file mode 100644 index 0000000000..0ceb34b362 --- /dev/null +++ b/tests/auto/quick/qquickrepeater/data/package2.qml @@ -0,0 +1,36 @@ +import QtQuick 2.0 +import QtQml.Models 2.2 +import QtQuick.Window 2.0 + +Item { + width: 300 + height: 300 + visible: true + DelegateModel { + id: mdl + + model: 1 + delegate: Package { + Item { + id: first + Package.name: "first" + } + Item{ + id: second + Package.name: "second" + } + } + } + + Repeater { + model: mdl.parts.first + } + Repeater { + model: mdl.parts.second + } + + function setup(): bool { + mdl.model = 2 + return true; + } +} |