Fix missing pSize.
This commit is contained in:
parent
3fa14d3c4b
commit
a8d12f92bd
|
@ -34,11 +34,14 @@ QImage ImageProvider::requestImage(const QString& id, QSize* pSize,
|
||||||
|
|
||||||
QUrl tempfilePath = QUrl::fromLocalFile(
|
QUrl tempfilePath = QUrl::fromLocalFile(
|
||||||
QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + "/" +
|
QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + "/" +
|
||||||
mxcUri.fileName() + "-" + QString::number(requestedSize.width()) +
|
mxcUri.fileName() + "-" + QString::number(requestedSize.width()) + "x" +
|
||||||
"x" + QString::number(requestedSize.height()) + ".png");
|
QString::number(requestedSize.height()) + ".png");
|
||||||
|
|
||||||
QImage cachedImage;
|
QImage cachedImage;
|
||||||
if (cachedImage.load(tempfilePath.toLocalFile())) return cachedImage;
|
if (cachedImage.load(tempfilePath.toLocalFile())) {
|
||||||
|
if (pSize != nullptr) *pSize = cachedImage.size();
|
||||||
|
return cachedImage;
|
||||||
|
}
|
||||||
|
|
||||||
MediaThumbnailJob* job = nullptr;
|
MediaThumbnailJob* job = nullptr;
|
||||||
QReadLocker locker(&m_lock);
|
QReadLocker locker(&m_lock);
|
||||||
|
|
Loading…
Reference in New Issue