roleNames are generally guaranteed to be stable (given that QAIM has no change signal for them), except that resetting the model is allowed to invalidate them. DelegateModel did so far not take this into account. Handle this case correctly by snapshotting the current roleNames before the model is reset. Afterwards, if we detect that roleNames has changed, we throw the current model set up away and rebuild everything from scratch – it is unlikely that a more efficient implementation would be worth it. If we detect no changes, we simply use the existing logic to handle the model reset. Note that some views, e.g. TableView do not use DelegateModel if they detect that the model is a QAIM. They require a conceptually similar fix (but can probaly implement this in a more efficient way). Fixes: QTBUG-32132 Fixes: QTBUG-103220 Pick-to: 6.2 6.5 Change-Id: I6874988cf09b8fe75d2e9750d0bf209915554c45 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> |
||
---|---|---|
LICENSES | ||
cmake | ||
coin | ||
dist | ||
examples | ||
features | ||
src | ||
tests | ||
tools | ||
.cmake.conf | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
.tag | ||
CMakeLists.txt | ||
README.md | ||
conanfile.py | ||
configure.cmake | ||
dependencies.yaml | ||
qt_cmdline.cmake | ||
qtdeclarative.doxy | ||
sync.profile |
README.md
qtdeclarative
The qtdeclarative repository is home to QML, Qt Quick and several related modules:
- Qt QML
- Qt QML Core
- Qt QML Models
- Qt QML WorkerScript
- Qt QML XmlListModel
- Qt Quick
- Qt Quick Controls 2
- Qt Quick Layouts
- Qt Quick Local Storage
- Qt Quick Particles
- Qt Quick Shapes
- Qt Quick Templates
- Qt Quick Test
In addition, there are several Qt Labs modules: