summaryrefslogtreecommitdiffstats
path: root/src/corelib/itemmodels/qitemselectionmodel.h
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2012-09-27 11:36:23 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-22 19:36:43 +0200
commitd18eb260d70b75376411fe3f69da82bf46fb503f (patch)
tree691ebaa77e301f0b3b52e894dbfd9e7085a292bd /src/corelib/itemmodels/qitemselectionmodel.h
parent0693082c95c1833f686accee74024db4eead3003 (diff)
Use the layout change hint to speed up QItemSelectionModel.
The testcase in the bug report takes 370035 ms to sort the rows with Qt 4, and 5646 ms in Qt 5 (when using the extra hints to layout*Changed). That's an improvement of more than 98%. Task-number: QTBUG-17732 Change-Id: If78f972d80c501e0cb39078228086c4f4ac8a65b Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/corelib/itemmodels/qitemselectionmodel.h')
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/itemmodels/qitemselectionmodel.h b/src/corelib/itemmodels/qitemselectionmodel.h
index 555401e621..79a8a25470 100644
--- a/src/corelib/itemmodels/qitemselectionmodel.h
+++ b/src/corelib/itemmodels/qitemselectionmodel.h
@@ -222,8 +222,8 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_rowsAboutToBeRemoved(const QModelIndex&, int, int))
Q_PRIVATE_SLOT(d_func(), void _q_columnsAboutToBeInserted(const QModelIndex&, int, int))
Q_PRIVATE_SLOT(d_func(), void _q_rowsAboutToBeInserted(const QModelIndex&, int, int))
- Q_PRIVATE_SLOT(d_func(), void _q_layoutAboutToBeChanged())
- Q_PRIVATE_SLOT(d_func(), void _q_layoutChanged())
+ Q_PRIVATE_SLOT(d_func(), void _q_layoutAboutToBeChanged(const QList<QPersistentModelIndex> &parents = QList<QPersistentModelIndex>(), QAbstractItemModel::LayoutChangeHint hint = QAbstractItemModel::NoHint))
+ Q_PRIVATE_SLOT(d_func(), void _q_layoutChanged(const QList<QPersistentModelIndex> &parents = QList<QPersistentModelIndex>(), QAbstractItemModel::LayoutChangeHint hint = QAbstractItemModel::NoHint))
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QItemSelectionModel::SelectionFlags)