|author||Stephen Kelly <firstname.lastname@example.org>||2012-08-22 18:01:32 +0200|
|committer||Qt by Nokia <email@example.com>||2012-08-23 15:54:02 +0200|
Make QAbstractItemModel::sibling virtual.
This would allow implementations to create an optimized way to create sibling indexes. A typical pattern of QAIM implementation is to use the same internalPointer for each row of a subtable of a model (such that the internalPointer is related to the common parent of each set of rows) and differentiate on the row value in the QModelIndex. Alternatively, it is also common to have the internalPointer correspond directly to the row value for the QModelIndex. In both cases it is possible for the implementation to optimally create a sibling QModelIndex in the same column as a known row. Provide a virtual method for them to do so. Change-Id: I3b076abcd5f6087a4cb108fbc6dceeef15529987 Reviewed-by: Marc Mutz <firstname.lastname@example.org> Reviewed-by: Stephen Kelly <email@example.com>
Diffstat (limited to 'dist')
1 files changed, 3 insertions, 0 deletions
diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0
index 4bb52961b1..c5db0852b1 100644
@@ -330,6 +330,9 @@ QtCore
should now also connect to (and disconnect from) the rowsAboutToBeMoved and
+* The QAbstractItemModel::sibling method was made virtual, allowing implementations
+ to optimize based on internal data.
* The default value of the property QSortFilterProxyModel::dynamicSortFilter was
changed from false to true.