Use const reference for AlbumCoverLoaderResult
This commit is contained in:
@@ -307,7 +307,7 @@ QPixmap RadioModel::ChannelIcon(const QModelIndex &idx) {
|
||||
|
||||
}
|
||||
|
||||
void RadioModel::AlbumCoverLoaded(const quint64 id, AlbumCoverLoaderResultPtr result) {
|
||||
void RadioModel::AlbumCoverLoaded(const quint64 id, const AlbumCoverLoaderResult &result) {
|
||||
|
||||
if (!pending_art_.contains(id)) return;
|
||||
|
||||
@@ -319,11 +319,11 @@ void RadioModel::AlbumCoverLoaded(const quint64 id, AlbumCoverLoaderResultPtr re
|
||||
|
||||
pending_cache_keys_.remove(cache_key);
|
||||
|
||||
if (!result || !result->success || result->image_scaled.isNull() || result->type == AlbumCoverLoaderResult::Type::ManuallyUnset) {
|
||||
if (!result.success || result.image_scaled.isNull() || result.type == AlbumCoverLoaderResult::Type::ManuallyUnset) {
|
||||
QPixmapCache::insert(cache_key, ServiceIcon(item));
|
||||
}
|
||||
else {
|
||||
QPixmapCache::insert(cache_key, QPixmap::fromImage(result->image_scaled));
|
||||
QPixmapCache::insert(cache_key, QPixmap::fromImage(result.image_scaled));
|
||||
}
|
||||
|
||||
const QModelIndex idx = ItemToIndex(item);
|
||||
|
||||
Reference in New Issue
Block a user