git: 06ed075c5ab9 - main - audio/mixxx: Improve latest patch file to fix qt5/qt6 issues

From: Jose Alonso Cardenas Marquez <acm_at_FreeBSD.org>
Date: Fri, 04 Jul 2025 23:46:49 UTC
The branch main has been updated by acm:

URL: https://cgit.FreeBSD.org/ports/commit/?id=06ed075c5ab92cb07559a39397a09d6eab043658

commit 06ed075c5ab92cb07559a39397a09d6eab043658
Author:     Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
AuthorDate: 2025-07-04 23:45:31 +0000
Commit:     Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
CommitDate: 2025-07-04 23:45:31 +0000

    audio/mixxx: Improve latest patch file to fix qt5/qt6 issues
    
    PR:             288013
    Reported by:    Chad Jacob Milios <milios _at__ ccsys.com>
---
 .../mixxx/files/patch-src_widget_wcoverartlabel.cpp  | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/audio/mixxx/files/patch-src_widget_wcoverartlabel.cpp b/audio/mixxx/files/patch-src_widget_wcoverartlabel.cpp
index 79b076cc427b..93f1c7defd39 100644
--- a/audio/mixxx/files/patch-src_widget_wcoverartlabel.cpp
+++ b/audio/mixxx/files/patch-src_widget_wcoverartlabel.cpp
@@ -1,25 +1,23 @@
 --- src/widget/wcoverartlabel.cpp.orig	2025-07-04 17:25:50 UTC
 +++ src/widget/wcoverartlabel.cpp
-@@ -70,11 +70,9 @@ void WCoverArtLabel::setPixmapAndResize(const QPixmap&
+@@ -70,7 +70,7 @@ void WCoverArtLabel::setPixmapAndResize(const QPixmap&
          m_fullSizeCover = px;
          setPixmap(m_loadedCover);
      }
 -#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
--    QSize newSize = pixmap().size() / devicePixelRatioF();
--#else
-+
++#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
+     QSize newSize = pixmap().size() / devicePixelRatioF();
+ #else
      QSize newSize = pixmap()->size() / devicePixelRatioF();
--#endif
-+
-     // add the frame so the entire pixmap is visible
-     newSize += QSize(frameWidth() * 2, frameWidth() * 2);
-     if (size() != newSize) {
-@@ -92,7 +90,7 @@ void WCoverArtLabel::setMaxSize(const QSize newSize) {
+@@ -92,7 +92,11 @@ void WCoverArtLabel::setMaxSize(const QSize newSize) {
      // Skip resizing the pixmap and label if the pixmap already fits.
      // Check if we got more space in one dimension and don't need it
      // for the other.
--    const QSize pixmapSize = pixmap().size() / devicePixelRatioF();
++#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
+     const QSize pixmapSize = pixmap().size() / devicePixelRatioF();
++#else
 +    const QSize pixmapSize = pixmap()->size() / devicePixelRatioF();
++#endif
      if (m_pixmapSizeMax == pixmapSize ||
              (m_pixmapSizeMax.height() == pixmapSize.height() &&
                      m_pixmapSizeMax.width() > pixmapSize.width()) ||