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
parent
659b6d5595
commit
d489d207c4
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue