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>
This commit is contained in:
parent
9d89f9019e
commit
9274ed77bc
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue