From 6e5082a6aaeadadf93feed3a1fa11a7447308a43 Mon Sep 17 00:00:00 2001 From: ronso0 Date: Thu, 16 Nov 2023 11:14:44 +0100 Subject: [PATCH] DlgCoverArtFullSize: copy fetched cover by value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Daniel Schürmann --- src/library/dlgcoverartfullsize.cpp | 4 ++-- src/library/dlgcoverartfullsize.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/library/dlgcoverartfullsize.cpp b/src/library/dlgcoverartfullsize.cpp index 119e815a24d..267fd38c18d 100644 --- a/src/library/dlgcoverartfullsize.cpp +++ b/src/library/dlgcoverartfullsize.cpp @@ -85,8 +85,8 @@ void DlgCoverArtFullSize::init(TrackPointer pTrack) { slotLoadTrack(pTrack); } -void DlgCoverArtFullSize::initFetchedCoverArt(const QPixmap& pixmap) { - m_pixmap = pixmap; +void DlgCoverArtFullSize::initFetchedCoverArt(QPixmap pixmap) { + m_pixmap = std::move(pixmap); // The real size will be calculated later by adjustImageAndDialogSize(). resize(100, 100); diff --git a/src/library/dlgcoverartfullsize.h b/src/library/dlgcoverartfullsize.h index 10ea631cc9e..1fe9d0bfd7e 100644 --- a/src/library/dlgcoverartfullsize.h +++ b/src/library/dlgcoverartfullsize.h @@ -24,7 +24,7 @@ class DlgCoverArtFullSize ~DlgCoverArtFullSize() override = default; void init(TrackPointer pTrack); - void initFetchedCoverArt(const QPixmap& fetchedCoverArtBytes); + void initFetchedCoverArt(QPixmap pixmap); void mousePressEvent(QMouseEvent* event) override; void mouseReleaseEvent(QMouseEvent* ) override; void mouseMoveEvent(QMouseEvent* ) override;