Ensure we always have a valid lastModified timestamp when setImagePath is called

Not tracking modification time of icon/themed stuff means we do not know
when we need to reject the cached versions of these. So ensure we try to
keep track of the svg that this is coming from, even if we do stuff to
it in the meantime.

Longer term this should be changed so the cache knows which files it is
caching and can reject things that changed in the meantime.
This commit is contained in:
Arjen Hiemstra 2020-09-22 14:44:56 +02:00
parent 54e12fcda0
commit 7b42e5b45d

View File

@ -253,11 +253,8 @@ bool SvgPrivate::setImagePath(const QString &imagePath)
}
}
if (!themed) {
QFile f(actualPath);
QFileInfo info(f);
QFileInfo info(path);
lastModified = info.lastModified().toSecsSinceEpoch();
}
q->resize();
emit q->imagePathChanged();