From d5c5f1c22a96f893e41e61fa5b58147f82b1320f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Sun, 12 Nov 2023 22:47:04 +0100 Subject: [PATCH] Manual inline requestUncachedCoverPrivate() --- src/library/coverartcache.cpp | 12 ++++++++---- src/library/coverartcache.h | 10 +--------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/library/coverartcache.cpp b/src/library/coverartcache.cpp index 7d3ad723872..e9575af8ace 100644 --- a/src/library/coverartcache.cpp +++ b/src/library/coverartcache.cpp @@ -107,9 +107,8 @@ QPixmap CoverArtCache::getCachedCover( } // static -void CoverArtCache::requestUncachedCoverPrivate( +void CoverArtCache::requestUncachedCover( const QObject* pRequester, - const TrackPointer& pTrack, const CoverInfo& coverInfo, int desiredWidth) { CoverArtCache* pCache = CoverArtCache::instance(); @@ -118,7 +117,7 @@ void CoverArtCache::requestUncachedCoverPrivate( } pCache->tryLoadCover( pRequester, - pTrack, + TrackPointer(), coverInfo, desiredWidth); } @@ -131,7 +130,12 @@ void CoverArtCache::requestUncachedCover( VERIFY_OR_DEBUG_ASSERT(pTrack) { return; } - requestUncachedCoverPrivate( + + CoverArtCache* pCache = CoverArtCache::instance(); + VERIFY_OR_DEBUG_ASSERT(pCache) { + return; + } + pCache->tryLoadCover( pRequester, pTrack, pTrack->getCoverInfoWithLocation(), diff --git a/src/library/coverartcache.h b/src/library/coverartcache.h index 1c51c3195bb..dae92eeb598 100644 --- a/src/library/coverartcache.h +++ b/src/library/coverartcache.h @@ -30,9 +30,7 @@ class CoverArtCache : public QObject, public Singleton { static void requestUncachedCover( const QObject* pRequester, const CoverInfo& coverInfo, - int desiredWidth) { - requestUncachedCoverPrivate(pRequester, TrackPointer(), coverInfo, desiredWidth); - } + int desiredWidth); static void requestUncachedCover( const QObject* pRequester, @@ -87,12 +85,6 @@ class CoverArtCache : public QObject, public Singleton { const CoverInfo& coverInfo, int desiredWidth = 0); // <= 0: original size - static void requestUncachedCoverPrivate( - const QObject* pRequester, - const TrackPointer& /*optional*/ pTrack, - const CoverInfo& coverInfo, - int desiredWidth); - void tryLoadCover( const QObject* pRequester, const TrackPointer& pTrack,