diff options
author | Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> | 2015-04-10 17:09:02 +0200 |
---|---|---|
committer | Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> | 2015-04-16 09:01:00 +0000 |
commit | 564fdbc1985f6de95d68ed7c7e64614bf5fc7d76 (patch) | |
tree | 0c541515738cddee3c10b899b349c700d2066960 /tests/auto/controls/data/tst_treeview.qml | |
parent | 19159469400ed6daa8bba1020eaaf149a16f1f18 (diff) | |
download | qtquickcontrols-564fdbc1985f6de95d68ed7c7e64614bf5fc7d76.tar.gz |
TreeModelAdaptor: Take into account childless expanded items
When removing or moving items, we may call lastChildIndex()
with an invalid index because we're not checking for childless
items which can be expanded (think about expanding an empty
directory). Same thing when relayouting an item.
The solution requires testing for the actual children count
since hasChildren() count return true even when the item has
no children.
Change-Id: I0fa6de41e20c6cb2433f8846449e9f1a2989ce91
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'tests/auto/controls/data/tst_treeview.qml')
0 files changed, 0 insertions, 0 deletions