summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2012-09-27 11:13:47 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-09-30 18:30:05 +0200
commit308987fb961e68f279a25a5e934bc66662f5f75a (patch)
tree539a080f1ba0b349457e348f07ea790adf7927f0 /src/gui
parent5b96f531376fb771d862d43bbe015cdbe83e1b85 (diff)
Emit layout change hint from QStandardItemModel.
Change-Id: I6d6a8c146b63c57634ae6b26ed5c1de249aa9e66 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/itemmodels/qstandarditemmodel.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/itemmodels/qstandarditemmodel.cpp b/src/gui/itemmodels/qstandarditemmodel.cpp
index 14ada74c02..6e919eb0b2 100644
--- a/src/gui/itemmodels/qstandarditemmodel.cpp
+++ b/src/gui/itemmodels/qstandarditemmodel.cpp
@@ -1861,11 +1861,15 @@ void QStandardItem::sortChildren(int column, Qt::SortOrder order)
Q_D(QStandardItem);
if ((column < 0) || (rowCount() == 0))
return;
- if (d->model)
- emit d->model->layoutAboutToBeChanged();
+
+ QList<QPersistentModelIndex> parents;
+ if (d->model) {
+ parents << index();
+ emit d->model->layoutAboutToBeChanged(parents, QAbstractItemModel::VerticalSortHint);
+ }
d->sortChildren(column, order);
if (d->model)
- emit d->model->layoutChanged();
+ emit d->model->layoutChanged(parents, QAbstractItemModel::VerticalSortHint);
}
/*!