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:
Shawn Rutledge 2024-11-27 20:18:37 +01:00 committed by Qt Cherry-pick Bot
parent c014312c20
commit 4059ea60e5

View File

@ -1178,7 +1178,7 @@ void QFileSystemModel::sort(int column, Qt::SortOrder order)
newList.append(d->index(node, col));
changePersistentIndexList(oldList, newList);
emit layoutChanged();
emit layoutChanged({}, VerticalSortHint);
}
/*!