CollectionModel: Add content to fake header for pixmap cache
QNetworkCacheMetaData requires this now.
This commit is contained in:
parent
c655963483
commit
6e90e72b4a
|
@ -719,7 +719,7 @@ void CollectionModel::AlbumCoverLoaded(const quint64 id, const AlbumCoverLoaderR
|
||||||
disk_cache_metadata.setSaveToDisk(true);
|
disk_cache_metadata.setSaveToDisk(true);
|
||||||
disk_cache_metadata.setUrl(disk_cache_key);
|
disk_cache_metadata.setUrl(disk_cache_key);
|
||||||
// Qt 6 now ignores any entry without headers, so add a fake header.
|
// Qt 6 now ignores any entry without headers, so add a fake header.
|
||||||
disk_cache_metadata.setRawHeaders(QNetworkCacheMetaData::RawHeaderList() << qMakePair(QByteArray(), QByteArray()));
|
disk_cache_metadata.setRawHeaders(QNetworkCacheMetaData::RawHeaderList() << qMakePair(QByteArray("collection-thumbnail"), cache_key.toUtf8()));
|
||||||
QIODevice *device_iconcache = sIconCache->prepare(disk_cache_metadata);
|
QIODevice *device_iconcache = sIconCache->prepare(disk_cache_metadata);
|
||||||
if (device_iconcache) {
|
if (device_iconcache) {
|
||||||
result.image_scaled.save(device_iconcache, "XPM");
|
result.image_scaled.save(device_iconcache, "XPM");
|
||||||
|
|
Loading…
Reference in New Issue