From d18eb260d70b75376411fe3f69da82bf46fb503f Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Thu, 27 Sep 2012 11:36:23 +0200 Subject: 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 --- src/corelib/itemmodels/qitemselectionmodel.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/corelib/itemmodels/qitemselectionmodel.h') 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 &parents = QList(), QAbstractItemModel::LayoutChangeHint hint = QAbstractItemModel::NoHint)) + Q_PRIVATE_SLOT(d_func(), void _q_layoutChanged(const QList &parents = QList(), QAbstractItemModel::LayoutChangeHint hint = QAbstractItemModel::NoHint)) }; Q_DECLARE_OPERATORS_FOR_FLAGS(QItemSelectionModel::SelectionFlags) -- cgit v1.2.3