summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qassociativeiterable.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Fix documentation warnings for QIterable and related classesTopi Reinio2020-10-291-3/+2
| | | | | | Task-number: QTBUG-86295 Change-Id: I1d4c851ae7d2910ab6276ab2215b5f6e550a12c8 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QAssociativeIterable: Unwrap variants on value()Ulf Hermann2020-10-191-2/+12
| | | | | | Fixes: QTBUG-87688 Change-Id: I66515eaa1217c34f003648af6423b318b54977c4 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QAssociativeIterable: Add methods to add/remove keys and valuesUlf Hermann2020-10-191-0/+55
| | | | | | | | This way we can actually modify the container. Previously the interface was rather useless. Change-Id: I278aae46999862ada115c9066a010d7de5cde4ff Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QMetaContainer: Consistently coerce typesUlf Hermann2020-10-191-14/+20
| | | | | | | | | | | | | | | The high-level iterable interfaces should coerce the types of most QVariants passed to the expected ones. To do this, move the type coercion code into qvariant.{h|cpp} so that it is available to the QVariantRef specializations. The exception are variants passed to the find() functions of associative iterables. Here, we should not coerce values we cannot convert to the default-constructed keys. Instead we return end() in such cases. Fixes: QTBUG-87687 Change-Id: I0bd4e5c4e4e270dd3bf36cb3fb115794828077f2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Extend QSequentialIterable and add QAssociativeIterableUlf Hermann2020-09-191-0/+253
And add mutable iterators. This requires some refactoring of the existing iterators. Task-number: QTBUG-81716 Change-Id: I61b3a3e8c0df5fd449679257a29d9f0c3d19c4f0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>