aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Raplee <kenrap@FreeBSD.org>2026-11-03 11:21:38 +0000
committerKenneth Raplee <kenrap@FreeBSD.org>2026-11-04 07:54:09 +0000
commit52da119bfb1b144bb9e9173c01efd439fd4b7278 (patch)
tree220f6908ae559a4e85915992f60b5bc30bc0b5ec
parent2e8f136527e95003ca8011690ed6211caa3fb477 (diff)
audio/midipp: Migrate to Qt6
The codebase uses no Qt5-only APIs, so this flips the port to qt:6 with a C++17 compiler floor. Several source patches replace the deprecated Qt calls with their current equivalents. (cherry picked from commit 379c522c3e25d4a38c6e84637ffe184c07905506)
-rw-r--r--audio/midipp/Makefile6
-rw-r--r--audio/midipp/files/patch-src_midipp__decode.cpp20
-rw-r--r--audio/midipp/files/patch-src_midipp__onlinetabs.cpp11
-rw-r--r--audio/midipp/files/patch-src_midipp__pianotab.cpp20
-rw-r--r--audio/midipp/files/patch-src_midipp__scores.cpp11
-rw-r--r--audio/midipp/files/patch-src_midipp__sheet.cpp11
-rw-r--r--audio/midipp/files/patch-src_midipp__volume.cpp20
7 files changed, 96 insertions, 3 deletions
diff --git a/audio/midipp/Makefile b/audio/midipp/Makefile
index 93d05f308ce0..b7d7363d2210 100644
--- a/audio/midipp/Makefile
+++ b/audio/midipp/Makefile
@@ -1,7 +1,7 @@
PORTNAME= midipp
DISTVERSIONPREFIX= v
DISTVERSION= 2.1.7
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= audio
MAINTAINER= ports@FreeBSD.org
@@ -10,9 +10,9 @@ WWW= https://github.com/hselasky/midipp
LICENSE= BSD2CLAUSE
-USES= compiler:c++11-lang gl qmake qt:5 tar:bzip2 desktop-file-utils
+USES= compiler:c++17-lang desktop-file-utils gl qmake qt:6 tar:bzip2
USE_GL= gl
-USE_QT= buildtools:build core gui network printsupport widgets
+USE_QT= base
USE_GITHUB= yes
GH_ACCOUNT= hselasky
diff --git a/audio/midipp/files/patch-src_midipp__decode.cpp b/audio/midipp/files/patch-src_midipp__decode.cpp
new file mode 100644
index 000000000000..a29a03704e0f
--- /dev/null
+++ b/audio/midipp/files/patch-src_midipp__decode.cpp
@@ -0,0 +1,20 @@
+--- src/midipp_decode.cpp.orig 2022-10-18 18:55:26 UTC
++++ src/midipp_decode.cpp
+@@ -237,7 +237,7 @@ MppDecodeCircle :: mousePressEvent(QMouseEvent *event)
+ void
+ MppDecodeCircle :: mousePressEvent(QMouseEvent *event)
+ {
+- QPoint p = event->pos();
++ QPoint p = event->position().toPoint();
+
+ for (uint8_t x = 0; x != NMAX; x++) {
+ for (uint8_t y = 0; y != 12; y++) {
+@@ -258,7 +258,7 @@ MppDecodeCircle :: mouseReleaseEvent(QMouseEvent *even
+ void
+ MppDecodeCircle :: mouseReleaseEvent(QMouseEvent *event)
+ {
+- QPoint p = event->pos();
++ QPoint p = event->position().toPoint();
+
+ for (uint8_t x = 0; x != NMAX; x++) {
+ for (uint8_t y = 0; y != 12; y++) {
diff --git a/audio/midipp/files/patch-src_midipp__onlinetabs.cpp b/audio/midipp/files/patch-src_midipp__onlinetabs.cpp
new file mode 100644
index 000000000000..c0a6f6297130
--- /dev/null
+++ b/audio/midipp/files/patch-src_midipp__onlinetabs.cpp
@@ -0,0 +1,11 @@
+--- src/midipp_onlinetabs.cpp.orig 2022-10-18 18:55:26 UTC
++++ src/midipp_onlinetabs.cpp
+@@ -82,7 +82,7 @@ MppOnlineTabsBrowse :: mousePressEvent(QMouseEvent *ev
+ MppOnlineTabsBrowse :: mousePressEvent(QMouseEvent *event)
+ {
+ if (event->button() & Qt::LeftButton) {
+- QString str(anchorAt(event->pos()));
++ QString str(anchorAt(event->position().toPoint()));
+ if (!str.isEmpty()) {
+ link = str;
+ emit linkChanged();
diff --git a/audio/midipp/files/patch-src_midipp__pianotab.cpp b/audio/midipp/files/patch-src_midipp__pianotab.cpp
new file mode 100644
index 000000000000..8aeff72f314d
--- /dev/null
+++ b/audio/midipp/files/patch-src_midipp__pianotab.cpp
@@ -0,0 +1,20 @@
+--- src/midipp_pianotab.cpp.orig 2022-10-18 18:55:26 UTC
++++ src/midipp_pianotab.cpp
+@@ -48,7 +48,7 @@ MppPianoTab :: mousePressEvent(QMouseEvent *event)
+ void
+ MppPianoTab :: mousePressEvent(QMouseEvent *event)
+ {
+- QPoint p = event->pos();
++ QPoint p = event->position().toPoint();
+ unsigned x;
+
+ for (x = 0; x != (2 * 12); x++) {
+@@ -105,7 +105,7 @@ MppPianoTab :: mouseReleaseEvent(QMouseEvent *event)
+ void
+ MppPianoTab :: mouseReleaseEvent(QMouseEvent *event)
+ {
+- QPoint p = event->pos();
++ QPoint p = event->position().toPoint();
+ unsigned x;
+
+ for (x = 0; x != (2 * 12); x++) {
diff --git a/audio/midipp/files/patch-src_midipp__scores.cpp b/audio/midipp/files/patch-src_midipp__scores.cpp
new file mode 100644
index 000000000000..5f7f422a9dc6
--- /dev/null
+++ b/audio/midipp/files/patch-src_midipp__scores.cpp
@@ -0,0 +1,11 @@
+--- src/midipp_scores.cpp.orig 2022-10-18 18:55:26 UTC
++++ src/midipp_scores.cpp
+@@ -624,7 +624,7 @@ MppScoreMain :: viewMousePressEvent(QMouseEvent *e)
+ {
+ int yi;
+
+- yi = ((e->pos().y() - MPP_VISUAL_MARGIN) / visual_y_max) + picScroll;
++ yi = ((e->position().y() - MPP_VISUAL_MARGIN) / visual_y_max) + picScroll;
+
+ if (yi < 0 || yi >= visual_max)
+ return;
diff --git a/audio/midipp/files/patch-src_midipp__sheet.cpp b/audio/midipp/files/patch-src_midipp__sheet.cpp
new file mode 100644
index 000000000000..07a88ccc63e5
--- /dev/null
+++ b/audio/midipp/files/patch-src_midipp__sheet.cpp
@@ -0,0 +1,11 @@
+--- src/midipp_sheet.cpp.orig 2022-10-18 18:55:26 UTC
++++ src/midipp_sheet.cpp
+@@ -566,7 +566,7 @@ MppSheet::mousePressEvent(QMouseEvent * event)
+ MppSheet::mousePressEvent(QMouseEvent * event)
+ {
+ MppScoreMain *sm = mw->scores_main[unit];
+- QPoint p = event->pos();
++ QPoint p = event->position().toPoint();
+ ssize_t x = ((p.x() - xoff + boxs - 1) / boxs) - 1;
+ ssize_t y = ((p.y() - yoff + boxs - 1) / boxs) - 1;
+
diff --git a/audio/midipp/files/patch-src_midipp__volume.cpp b/audio/midipp/files/patch-src_midipp__volume.cpp
new file mode 100644
index 000000000000..208e31a4f2a4
--- /dev/null
+++ b/audio/midipp/files/patch-src_midipp__volume.cpp
@@ -0,0 +1,20 @@
+--- src/midipp_volume.cpp.orig 2022-10-18 18:55:26 UTC
++++ src/midipp_volume.cpp
+@@ -46,7 +46,7 @@ MppVolume :: mousePressEvent(QMouseEvent *event)
+ if (event->button() == Qt::LeftButton) {
+ moving = 1;
+ curr_delta = 0;
+- y_pos = event->pos().y();
++ y_pos = event->position().y();
+ }
+ }
+
+@@ -68,7 +68,7 @@ MppVolume :: mouseMoveEvent(QMouseEvent *event)
+ MppVolume :: mouseMoveEvent(QMouseEvent *event)
+ {
+ if (moving) {
+- curr_delta = ((y_pos - event->pos().y()) * (max - min + 1)) / 128;
++ curr_delta = ((y_pos - event->position().y()) * (max - min + 1)) / 128;
+
+ if ((curr_delta + curr_pos) > max)
+ curr_delta = max - curr_pos;