diff options
| author | Ulf Hermann <[email protected]> | 2025-09-26 11:31:04 +0200 |
|---|---|---|
| committer | Ulf Hermann <[email protected]> | 2025-12-02 16:01:49 +0100 |
| commit | 9adaf8505a9eb9d7acb7fee6aeac5341aa24a074 (patch) | |
| tree | d4e3875f77c590de887d5ff11a32ca699cce4426 /src/widgets/util/qundogroup.cpp | |
| parent | cb8bb93242a57902f1cafcb0754252575ca180c8 (diff) | |
QSequentialIterable and QAssociativeIterable are incapable of providing
operator[] on their iterators because the references used by those
iterators are not actually stable when the iterator is modified.
The only way to fix this in a binary compatible way is to provide a
complete set of new iterables and iterators. These are implemented in
qmeta{association|sequence}.h and exposed through
QMeta{Association|Sequence}::Iterable.
In order to give users a convenient way to include those, we instruct
syncqt to regard qmeta{association|sequence}.h as header to use in order
to provide QMetaSequence and QMetaAssociation. These headers are the
natural choice anyway. qmetacontainer.h still has to hold the (now
incomplete) declarations for QMetaSequence and QMetaAssociation so that
we remain source compatible.
The new iterables offer a more consistent set of accessor methods and
deprecate some of the old accessor methods. It makes little sense to add
or remove a value from/to an iterable at an unspecified place. The new
sequential iterable offers the more familiar append/prepend and
removeFirst/removeLast methods.
Finally, the new iterables warn when taking a slow code path that
synthesizes operations not avaible on the actual container using
iterators. There generally is a reason for those operations to not be
available and we shouldn't second-guess the choices made by the authors
of the container. For now, we have to keep those code paths intact to
remain compatible with QSequentialIterable and QAssociativeIterable.
Task-number: QTBUG-140181
Change-Id: I2f4c32716951fa023ae1fb8028d1a87e4c85c3a0
Reviewed-by: Fabian Kosmale <[email protected]>
Diffstat (limited to 'src/widgets/util/qundogroup.cpp')
0 files changed, 0 insertions, 0 deletions
