Emit layout change hint from QStringListModel.

Change-Id: I8b4a01cfcca59103f2616b72645994a22bff40dd
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
bb10
Stephen Kelly 2012-09-27 11:12:59 +02:00 committed by The Qt Project
parent 123999af3f
commit 5b96f53137
1 changed files with 2 additions and 2 deletions

View File

@ -249,7 +249,7 @@ static bool decendingLessThan(const QPair<QString, int> &s1, const QPair<QString
*/
void QStringListModel::sort(int, Qt::SortOrder order)
{
emit layoutAboutToBeChanged();
emit layoutAboutToBeChanged(QList<QPersistentModelIndex>(), VerticalSortHint);
QList<QPair<QString, int> > list;
for (int i = 0; i < lst.count(); ++i)
@ -273,7 +273,7 @@ void QStringListModel::sort(int, Qt::SortOrder order)
newList.append(index(forwarding.at(oldList.at(i).row()), 0));
changePersistentIndexList(oldList, newList);
emit layoutChanged();
emit layoutChanged(QList<QPersistentModelIndex>(), VerticalSortHint);
}
/*!