diff options
author | Andy Shaw <andy.shaw@qt.io> | 2019-09-19 07:26:44 +0200 |
---|---|---|
committer | Andy Shaw <andy.shaw@qt.io> | 2019-09-19 13:34:39 +0000 |
commit | 44600c6b5da91a6b28f642486ca898b68fbdb675 (patch) | |
tree | 80de430745691b87b1031fd1c669637abbc6dacd /src | |
parent | b0c9c5b8d9a78b8f9b6bbb32cf17733d4b582810 (diff) |
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 <mitch.curtis@qt.io>
(cherry picked from commit 9274ed77bc273330a3f202a00239dcc1b6ef8cc3)
Diffstat (limited to 'src')
-rw-r--r-- | src/imports/folderlistmodel/qquickfolderlistmodel.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/imports/folderlistmodel/qquickfolderlistmodel.cpp b/src/imports/folderlistmodel/qquickfolderlistmodel.cpp index affb1e9fe2..36f906faa4 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; } |