summaryrefslogtreecommitdiffstats
path: root/src/testlib
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@qt.io>2018-04-24 17:06:49 +0200
committerErik Verbruggen <erik.verbruggen@qt.io>2018-06-27 10:01:07 +0000
commit74be42ca598c4f13486191c0b8c58bee3d1f1090 (patch)
tree4895fe5a2f995c3dbd112469b527ff789e0f76b4 /src/testlib
parente3a1b18bc3e213c318107b84b07543d945b48514 (diff)
ItemModels: Cache last-known child index
Instead of caching the last index of a search for a child item, cache the index of the child in the child item. When the item model is not changed, the index is valid. Otherwise, the index can only change when items get inserted or removed before the child. So in that case, start searching in the vicinity of the previously known index. As an example: a selectAll() on the view will always hit the cached index, so no search is performed for any item in the model/view. Task-number: QTBUG-61368 Change-Id: I85d085299987237fae23451d9e8bbb6060464ef2 Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src/testlib')
0 files changed, 0 insertions, 0 deletions