diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2019-10-16 10:45:46 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2019-10-16 20:34:57 +0200 |
commit | 072b5369ee107251d6800970263f573f74864fca (patch) | |
tree | 82c6ad6aae749cd10b11ee3dfe8dfa1477a510cf /src/quickcontrols2/qquickpaddedrectangle_p.h | |
parent | 56963a4485445d91bd1ab37ad0bdf22f504ea0ce (diff) |
Adapt Tumbler after ListView changesv5.14.0-beta2
After 2d9cf3ef, ListView now changes the currentIndex for some unknown
reason. The changes clearly didn't cause any failures in Qt Quick's
auto tests, but some Tumbler auto tests fail. Presumably, the failures
are due to TumblerView's intimate usage of Qt Quick's C++ API, where it
creates either a PathView or a ListView on demand internally.
From what I could see, the currentIndex change was caused by this code:
if (FxViewItem *snapItem = d->snapItemAt(d->highlight->position())) {
if (snapItem->index >= 0 && snapItem->index != d->currentIndex)
d->updateCurrent(snapItem->index);
}
So I worked around the issue by delaying the call to
setHighlightRangeMode() until after the delegate has been created. I
also tried moving the call to setSnapMode() (which seems very relevant
given the context), but it caused test failures.
Change-Id: I7017760c21193dc6ce8181669ba7cf047b18dfba
Fixes: QTBUG-79150
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quickcontrols2/qquickpaddedrectangle_p.h')
0 files changed, 0 insertions, 0 deletions