audio/mixxx: Fix Qt5 build

Reported by:	pkg-fallout
This commit is contained in:
Jose Alonso Cardenas Marquez 2025-07-04 10:28:32 -07:00
parent fec88c7513
commit ad4545da10
No known key found for this signature in database
GPG Key ID: 335B9246BA5E30F4
2 changed files with 26 additions and 0 deletions

View File

@ -1,5 +1,6 @@
PORTNAME= mixxx
DISTVERSION= 2.5.2
PORTREVISION= 1
CATEGORIES= audio
MAINTAINER= acm@FreeBSD.org

View File

@ -0,0 +1,25 @@
--- 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&
m_fullSizeCover = px;
setPixmap(m_loadedCover);
}
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 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) {
// 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();
+ const QSize pixmapSize = pixmap()->size() / devicePixelRatioF();
if (m_pixmapSizeMax == pixmapSize ||
(m_pixmapSizeMax.height() == pixmapSize.height() &&
m_pixmapSizeMax.width() > pixmapSize.width()) ||