From 9274ed77bc273330a3f202a00239dcc1b6ef8cc3 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Thu, 19 Sep 2019 07:26:44 +0200 Subject: Check if the filters are different before triggering an update If the filters list is the same as before, then there is no reason to trigger an update on the thread as the result would be the same as before. This solves a problem that was occurring with iOS 13 as it would get stuck due to repeated calls to setNameFilters() with the same filter list. Fixes: QTBUG-78468 Change-Id: I705cfaaa0a1a19b1d0397140a5831fc67557a4ee Reviewed-by: Mitch Curtis --- src/imports/folderlistmodel/qquickfolderlistmodel.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/imports') diff --git a/src/imports/folderlistmodel/qquickfolderlistmodel.cpp b/src/imports/folderlistmodel/qquickfolderlistmodel.cpp index 2040fb5f0c..51931097f3 100644 --- a/src/imports/folderlistmodel/qquickfolderlistmodel.cpp +++ b/src/imports/folderlistmodel/qquickfolderlistmodel.cpp @@ -539,6 +539,8 @@ QStringList QQuickFolderListModel::nameFilters() const void QQuickFolderListModel::setNameFilters(const QStringList &filters) { Q_D(QQuickFolderListModel); + if (d->nameFilters == filters) + return; d->fileInfoThread.setNameFilters(filters); d->nameFilters = filters; } -- cgit v1.2.3