Gather file infos synchronously on no-thread builds

QFileInfoGatherer is implicitly dependent on threads - there are
no compile guards but the file scan loop runs on a thread.
Make it gather file infos sync if threads are not enabled so that
signals are properly fired from it on filesystem scans.

Fixes: QTBUG-85445
Backport-to: 6.4 5.15
Change-Id: I55f37497aa97bde2fc0fa2dece33c95acc870e99
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
Mikolaj Boc 2022-10-19 10:47:45 +02:00
parent 738e05a55a
commit 3f86c62a81

View File

@ -121,9 +121,13 @@ void QFileInfoGatherer::fetchExtendedInformation(const QString &path, const QStr
}
loc = this->path.lastIndexOf(path, loc - 1);
}
#if QT_CONFIG(thread)
this->path.push(path);
this->files.push(files);
condition.wakeAll();
#else // !QT_CONFIG(thread)
getFileInfos(path, files);
#endif // QT_CONFIG(thread)
#if QT_CONFIG(filesystemwatcher)
if (files.isEmpty()