Affects e.g. Advanced Find->All Projects. Progress bar was not updating
at all, except at the end of the search.
The fix is a workaround for regression in
QFutureInterface::isProgressUpdateNeeded that would no longer return
true the very first time in Qt 4.7. To be reverted when this is fixed
in a released Qt version.
Reviewed-by: dt
}
++numFilesSearched;
- if (future.isProgressUpdateNeeded()) {
+ if (future.isProgressUpdateNeeded()
+ || future.progressValue() == 0 /*workaround for regression in Qt*/) {
if (!results.isEmpty()) {
future.reportResult(results);
results.clear();
++lineNr;
}
++numFilesSearched;
- if (future.isProgressUpdateNeeded()) {
+ if (future.isProgressUpdateNeeded()
+ || future.progressValue() == 0 /*workaround for regression in Qt*/) {
if (!results.isEmpty()) {
future.reportResult(results);
results.clear();
QStringList filesFound;
while (!future.isCanceled() && it.hasNext()) {
filesFound << it.next();
- if (future.isProgressUpdateNeeded()) {
+ if (future.isProgressUpdateNeeded()
+ || future.progressValue() == 0 /*workaround for regression in Qt*/) {
future.setProgressValueAndText(it.currentProgress(),
tr("%1 filter update: %n files", 0, filesFound.size()).arg(m_name));
}