Fix dead code in SvgRectsCache::loadImageFromCache
This dead code was found during investigation of KDE bug 433907. "ok" is always "false", thus next condition is always "false" and m_localRectCache is never filled from cache. It looks like "ok" should be set to "true" if "key" contains a valid integer value.
This commit is contained in:
parent
8a35f83c4b
commit
325938ece3
@ -222,9 +222,10 @@ void SvgRectsCache::loadImageFromCache(const QString &path, uint lastModified)
|
||||
|
||||
for (const auto &key : imageGroup.keyList()) {
|
||||
bool ok = false;
|
||||
uint keyUInt = key.toUInt(&ok);
|
||||
if (ok) {
|
||||
const QRectF rect = imageGroup.readEntry(key, QRectF());
|
||||
m_localRectCache.insert(key.toUInt(), rect);
|
||||
m_localRectCache.insert(keyUInt, rect);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user