diff options
| author | Oliver Eftevaag <oliver.eftevaag@qt.io> | 2024-10-17 15:43:42 +0200 |
|---|---|---|
| committer | Oliver Eftevaag <oliver.eftevaag@qt.io> | 2024-11-19 22:59:08 +0100 |
| commit | 55c3b94035787ea265c5ff6e3c271d7154186def (patch) | |
| tree | c5748dd31b82937a43d7a8447eb296b7437f96e4 /src/qmlcompiler/qqmljsfunctioninitializer.cpp | |
| parent | 4af42404be163a89c0fd62a9cbf7c2544189aa4a (diff) | |
Move DelegateChooser from Qt.labs.models to QtQml.Models
I assume the intention was to eventually move it out of Qt.labs.models,
once we've had a second look at the API, and are happy enough with it.
The DelegateChooser uses the adaptor model's `value` function, to fetch
data from the model, which it then uses for finding a suitable
DelegateChoice to use. (Based on the DelegateChoice::roleValue
property).
Since the adaptor model's `value` function takes a QString, as the role
to read data from, it won't make sense to change the datatype of
DelegateChooser::role.
The rest of the API makes sense too, in my opinion, and I see no reason
to change it.
Add a simple test in tst_qqmldelegatemodel, since QQmlDelegateModel is
using the DelegateChooser in QQmlDelegateModelPrivate::resolveDelegate.
[ChangeLog][QtQmlModels][Important Behavior Change] DelegateChooser has
been moved from Qt.labs.models to QtQml.Models.
Fixes: QTBUG-98101
Task-number: QTBUG-100069
Change-Id: I76ea58f57475b6a069517b5030e2ba3ac47007d2
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/qmlcompiler/qqmljsfunctioninitializer.cpp')
0 files changed, 0 insertions, 0 deletions
