aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktableview.cpp
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2019-10-31 15:16:04 +0100
committerRichard Moe Gustavsen <richard.gustavsen@qt.io>2019-11-28 11:15:29 +0100
commitc83ab72c82f5257eb81b9c2fb1c70ca93e21401f (patch)
tree5d644e86f79bfae18270f0109dbe0ae62127029e /src/quick/items/qquicktableview.cpp
parent77a5b336fc7dbb16840e6b2ec86365c2f5e979c6 (diff)
QQmlInstanceModel::ReleaseFlags: add enum value 'Pooled'
Now that we're about to add support for delegate item recycling in ListView, we need to add an extra enum value to the ReleaseFlags. This will be needed later so that ListView can distinguish between items that are still referenced and visible in the viewport, and items that not referenced, but at the same time, still alive in the pool. Change-Id: I4a1110b6b43ba109ccd160d22010569dd5410829 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quick/items/qquicktableview.cpp')
-rw-r--r--src/quick/items/qquicktableview.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/quick/items/qquicktableview.cpp b/src/quick/items/qquicktableview.cpp
index 89839c8aab..5550ed0a78 100644
--- a/src/quick/items/qquicktableview.cpp
+++ b/src/quick/items/qquicktableview.cpp
@@ -1065,10 +1065,7 @@ void QQuickTableViewPrivate::releaseItem(FxTableItem *fxTableItem, QQmlTableInst
tableModel->release(item, reusableFlag) :
model->release(item);
- if (releaseFlag != QQmlInstanceModel::Destroyed) {
- // When items are not destroyed, it typically means that the
- // item is reused, or that the model is an ObjectModel. If
- // so, we just hide the item instead.
+ if (releaseFlag == QQmlInstanceModel::Pooled) {
fxTableItem->setVisible(false);
// If the item (or a descendant) has focus, remove it, so