tst_QNetworkReply: port Q_FOREACH to ranged-for

The QHash "cache" isn't modified in the loop body (method is const), in
general cacheSize() shouldn't be susceptible to data races.

Task-number: QTBUG-115839
Change-Id: I122a03ddd5e648d16736c16fa9289eafc886979d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
bb10
Ahmad Samir 2023-08-11 20:11:56 +03:00
parent 659b6d5595
commit d489d207c4
1 changed files with 1 additions and 1 deletions

View File

@ -850,7 +850,7 @@ public:
qint64 cacheSize() const override
{
qint64 total = 0;
foreach (const CachedContent &entry, cache)
for (const auto &[_, entry] : cache.asKeyValueRange())
total += entry.second.size();
return total;
}