Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.4.0
-
None
Description
Assume we have a QStringListModel called "smodel" with entries
Row 0: "Track1"
Row 1: "Track2"
that is remoted as the source model. There is a QAbstractItemModelReplica acquired from the source model and a ListView that displays the content of this model replica.
Now we execute the following on the source side:
smodel->setData(smodel->index(0), "Track1B", Qt::DisplayRole);
smodel->insertRow(0);
The string change to "Track1B" never populates in the ListView, as all it ever gets is a dataChanged for Row 0.
When fetchPendingData for Row 0 is called in the replica's onDataChanged(), the new row already has been inserted on the source side, returning an empty string instead of the "Track1B", of course. Row 1 stays without a cache entry.
The ListView never notices that Row 1 is outdated and displays the old value for that row.
Is there an oversight from my side on how this should work or is this just an edge case?