aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items
diff options
context:
space:
mode:
authorLu YaNing <luyaning@uniontech.com>2022-06-29 14:32:01 +0800
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-07-01 18:45:15 +0000
commitc425e94ad8f6b30f826b7d9964b6ff142164c864 (patch)
tree208e2acc8c9137162e3057065643bef265c535cf /src/quick/items
parent18ca2d72e498a54bffe5a4f099a0320a348c5558 (diff)
Repeater: Add cancel culling of item description info from ObjectModel
In addition to the problem that MenuItem has been cull as mentioned in 19637c2241724cac55315afbb70b5f4333a2065b, it is also found that ComboBox and TabBar also have the same problem. Change-Id: I6d4224774e077b3132e4a2455c0e51ed21568537 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 2948f630b4ce21917be1613756b170017603a89e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/quick/items')
-rw-r--r--src/quick/items/qquickrepeater.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/quick/items/qquickrepeater.cpp b/src/quick/items/qquickrepeater.cpp
index ccd1ced81a..35d9da976d 100644
--- a/src/quick/items/qquickrepeater.cpp
+++ b/src/quick/items/qquickrepeater.cpp
@@ -440,8 +440,9 @@ void QQuickRepeater::initItem(int index, QObject *object)
d->deletables[index] = item;
item->setParentItem(parentItem());
- // If the item comes from an ObjectModel, it might be used as Menu's contentItem.
- // Menu unconditionally culls items that are inserted, so account for that here.
+ // If the item comes from an ObjectModel, it might be used as
+ // ComboBox/Menu/TabBar's contentItem. These types unconditionally cull items
+ // that are inserted, so account for that here.
if (d->dataSourceIsObject)
QQuickItemPrivate::get(item)->setCulled(false);
if (index > 0 && d->deletables.at(index-1)) {