diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2023-05-02 16:06:25 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2023-05-09 21:28:06 +0200 |
commit | 7e1988539983531ecce589d76479f5bbe9bdb9b6 (patch) | |
tree | 5e5804cbf16d40ad7df3bca4d706852dd3a7b769 /src/quick/items/qquickitem_p.h | |
parent | da863fad2fe6d437c6ee825c9f4438626df9b00b (diff) |
QQuickItem: Do not synthesize replace() for data/resources/children
Those properties are not actually sequential containers. They have some
internal logic that refuses certain operations and changes the semantics
of others. We should not run things like splice() on them.
We can natively implement removeLast(), though.
Pick-to: 6.5
Fixes: QTBUG-112949
Change-Id: Ic9fa84f98a68428df9e958ba7fc72b0987e8601f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/quick/items/qquickitem_p.h')
-rw-r--r-- | src/quick/items/qquickitem_p.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/quick/items/qquickitem_p.h b/src/quick/items/qquickitem_p.h index df6ec900ce..272d8878b4 100644 --- a/src/quick/items/qquickitem_p.h +++ b/src/quick/items/qquickitem_p.h @@ -265,18 +265,21 @@ public: static qsizetype data_count(QQmlListProperty<QObject> *); static QObject *data_at(QQmlListProperty<QObject> *, qsizetype); static void data_clear(QQmlListProperty<QObject> *); + static void data_removeLast(QQmlListProperty<QObject> *); // resources property static QObject *resources_at(QQmlListProperty<QObject> *, qsizetype); static void resources_append(QQmlListProperty<QObject> *, QObject *); static qsizetype resources_count(QQmlListProperty<QObject> *); static void resources_clear(QQmlListProperty<QObject> *); + static void resources_removeLast(QQmlListProperty<QObject> *); // children property static void children_append(QQmlListProperty<QQuickItem> *, QQuickItem *); static qsizetype children_count(QQmlListProperty<QQuickItem> *); static QQuickItem *children_at(QQmlListProperty<QQuickItem> *, qsizetype); static void children_clear(QQmlListProperty<QQuickItem> *); + static void children_removeLast(QQmlListProperty<QQuickItem> *); // visibleChildren property static void visibleChildren_append(QQmlListProperty<QQuickItem> *prop, QQuickItem *o); |