From 96d5c28a112b5ccc1bfbb09c12e4fc76e8c6a82b Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 22 Aug 2012 18:01:32 +0200 Subject: 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 Reviewed-by: Stephen Kelly --- dist/changes-5.0.0 | 3 +++ 1 file changed, 3 insertions(+) (limited to 'dist') diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0 index 4bb52961b1..c5db0852b1 100644 --- a/dist/changes-5.0.0 +++ b/dist/changes-5.0.0 @@ -330,6 +330,9 @@ QtCore should now also connect to (and disconnect from) the rowsAboutToBeMoved and rowsMoved signals. +* 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. -- cgit v1.2.3