From bf714c246b5e45d259a07cf19b668f091fa396a4 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Wed, 27 Nov 2024 20:18:37 +0100 Subject: [PATCH] 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. Pick-to: 6.8 Fixes: QTBUG-131487 Change-Id: I8478eaf1e8294e101f3fedc285e44f83e600c566 Reviewed-by: Volker Hilsheimer --- src/gui/itemmodels/qfilesystemmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/itemmodels/qfilesystemmodel.cpp b/src/gui/itemmodels/qfilesystemmodel.cpp index 6bb2761b8af..76bcb8fada3 100644 --- a/src/gui/itemmodels/qfilesystemmodel.cpp +++ b/src/gui/itemmodels/qfilesystemmodel.cpp @@ -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); } /*!