aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlmodels/qqmlobjectmodel.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QQmlListProperty: Use qsizetype rather than int for sizesUlf Hermann2020-11-091-4/+4
| | | | | | | | | | [ChangeLog][QtQml] The QQmlListProperty callback functions use qsizetype now as type for the size of a list. This is in line with the containers that you might use to back the list. Fixes: QTBUG-88269 Change-Id: Ia38403cb32f241e6c70e1a580dbeff1d6d694331 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Doc: Fix documentation warnings for QML Models and Test modulesTopi Reinio2020-11-051-2/+2
| | | | | | Fixes: QTBUG-88156 Change-Id: Ie9723f1bb612f4603d15455a0320cc01b27ff181 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-02-171-6/+28
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/qtqml/plugin.cpp src/qml/qml/qqml.h src/qml/qml/qqmlmetatype.cpp src/qml/qml/qqmlmetatype_p.h src/qml/qml/qqmltypeloader.cpp src/qml/types/qqmlbind.cpp src/quick/items/qquickitemsmodule.cpp tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp Change-Id: I52548938a582cb6510271ed4bc3a9aa0c3c11df6
| * Fix QQmlObjectModel::destroyingItem emissionSimon Hausmann2020-02-101-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The signal is used to tell the view that the item is definitely going away. For the "view" based QQmlObjectModel that is almost never really the case, except - oddly - for clear(). The view is typically a QQuickItemView, which casts the item to a QQuickItem and calls setParentItem(nullptr). That in turn is caught by QQuickContainer, which calls remove() on the QQmlObjectModel. That is why remove() can't emit destroyingItem(). Amends 6d0a453f41d304239285d64b06612c36922be701 Change-Id: I5d82def872550744b947b4b53447647327e03f67 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * Use the extended QQmlListProperty interface in a few placesUlf Hermann2020-02-071-9/+30
| | | | | | | | | | | | | | Task-number: QTBUG-79263 Change-Id: If518f644b5b9eddbacfb1cb16fbb557127ffcfb2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-12-121-2/+2
|\| | | | | | | | | | | | | Conflicts: src/qml/types/qqmlbind.cpp Change-Id: Ib992d1a7ac6c1a96d39819be6f23955dc31b44b2
| * QQmlTableInstanceModel: factor out reuse poolRichard Moe Gustavsen2019-12-041-1/+1
| | | | | | | | | | | | | | | | | | Factor out the reuse pool logic in TableInstanceModel into a separate class, so that we can share it with the upcoming implementation for recycling items in QQmlDelegateModel. Change-Id: If8f700b7a0208bac7d1cb1de087792e2c3a9b512 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * Avoid initializing QFlags with 0 or nullptr in further casesFriedemann Kleint2019-11-251-1/+1
| | | | | | | | | | | | | | Amends 744e77b841878fb017c0f2d60607090008f28180. Change-Id: I16e37aaf503eb62f67fca0e48be4c92c4a72ae46 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Take a copy of the children list before emitting the destroyingItem signalLars Knoll2019-11-011-1/+4
|/ | | | | | | | | | | | clear() emits a signal for each item that is being destroyed. Unfortunately that signal can be connected to some other place that already removes the item indirectly. In that case, we would not correctly emit the destroyed signal for all items, leading to errors later on. Fixes a test failure in Qt Quick Controls 2 Change-Id: I3aff75d9263badd9f87883610c7a00a94ee823d3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QQmlObjectModel: Return object property from variantValue()Ulf Hermann2019-10-211-1/+1
| | | | | | | | | | | | | | Returning a context property was a strange choice. We want to get rid of context properties. [ChangeLog][Important Behavior Changes] The QML ObjectModel type had an undocumented "feature" which made it sort items in list views into sections according to context properties of the QML context the created objects belong to. Instead of context properties, object properties are used now. Change-Id: Ibd94c903910f0cdb76ead50db92a24eefebfa3fc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-09-121-4/+4
| | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4engine.cpp src/quick/handlers/qquicktaphandler.cpp src/quick/items/qquicktableview.cpp Done-With: Richard Moe Gustavsen <richard.gustavsen@qt.io> Done-With: Ulf Hermann <ulf.hermann@qt.io> Done-With: Shawn Rutledge <shawn.rutledge@qt.io> Change-Id: If9558a33f01693ce96420c094e0b57dfff0626cd
* Move model types into their own libraryUlf Hermann2019-05-021-0/+431
The model types are not part of the core QML runtime and should only be loaded if you explicitly import them. We cannot enforce that in Qt5 as some of them are available from the QtQml import, but we can change it in Qt6. Change-Id: I1e49e84d748e352537ec2d4af901c034c91d038f Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>