aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlmodels/qqmltableinstancemodel.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-11-21 11:34:57 +0100
committerUlf Hermann <ulf.hermann@qt.io>2019-11-22 09:50:11 +0100
commitaa3813366a8e772cd58c9253461cf2dc50b97a9d (patch)
treee306a60fa9b2d1f7dd2e6b245fdf05214c7c55df /src/qmlmodels/qqmltableinstancemodel.cpp
parent4241bb4d26ef69eb212e0274bad0926ec71bead9 (diff)
parentacb6ed0815f92588c3ff875a568e9561fe61218c (diff)
Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts: src/qml/qml/qqmlextensionplugin.cpp tests/auto/quick/qquicktableview/tst_qquicktableview.cpp Change-Id: Ic58d36a8532015bae30f2690063db9829b3bf372
Diffstat (limited to 'src/qmlmodels/qqmltableinstancemodel.cpp')
-rw-r--r--src/qmlmodels/qqmltableinstancemodel.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/qmlmodels/qqmltableinstancemodel.cpp b/src/qmlmodels/qqmltableinstancemodel.cpp
index a538ae4a1f..3597af8b27 100644
--- a/src/qmlmodels/qqmltableinstancemodel.cpp
+++ b/src/qmlmodels/qqmltableinstancemodel.cpp
@@ -342,9 +342,13 @@ void QQmlTableInstanceModel::reuseItem(QQmlDelegateModelItem *item, int newModel
{
// Update the context properties index, row and column on
// the delegate item, and inform the application about it.
+ // Note that we set alwaysEmit to true, to force all bindings
+ // to be reevaluated, even if the index didn't change (since
+ // the model can have changed size since last usage).
+ const bool alwaysEmit = true;
const int newRow = m_adaptorModel.rowAt(newModelIndex);
const int newColumn = m_adaptorModel.columnAt(newModelIndex);
- item->setModelIndex(newModelIndex, newRow, newColumn);
+ item->setModelIndex(newModelIndex, newRow, newColumn, alwaysEmit);
// Notify the application that all 'dynamic'/role-based context data has
// changed as well (their getter function will use the updated index).