QFileSystemModel::sort(): emit layoutChanged with VerticalSortHint
It's good to give a hint about what changed, and it helps behavior of QQmlDelegateModel when that is used in the view. Fixes: QTBUG-131487 Change-Id: I8478eaf1e8294e101f3fedc285e44f83e600c566 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit bf714c246b5e45d259a07cf19b668f091fa396a4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
c014312c20
commit
4059ea60e5
@ -1178,7 +1178,7 @@ void QFileSystemModel::sort(int column, Qt::SortOrder order)
|
|||||||
newList.append(d->index(node, col));
|
newList.append(d->index(node, col));
|
||||||
|
|
||||||
changePersistentIndexList(oldList, newList);
|
changePersistentIndexList(oldList, newList);
|
||||||
emit layoutChanged();
|
emit layoutChanged({}, VerticalSortHint);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user