aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Raplee <kenrap@FreeBSD.org>2026-11-03 11:22:38 +0000
committerKenneth Raplee <kenrap@FreeBSD.org>2026-11-04 07:54:09 +0000
commitb35293dc98967479339399018470a01d9ede9a11 (patch)
treed1eadc518a6524f4052b6ffa022a425bdab16553
parent52da119bfb1b144bb9e9173c01efd439fd4b7278 (diff)
audio/qaudiosonar: Migrate to Qt6
The codebase uses no Qt5-only APIs, so this flips the port to qt:6 with a C++17 compiler floor. One small source patch replaces the deprecated Qt calls with their current equivalents. (cherry picked from commit 7c76d9b0a7e4aae8b21f08611fe02d2a534c165d)
-rw-r--r--audio/qaudiosonar/Makefile6
-rw-r--r--audio/qaudiosonar/files/patch-src_qaudiosonar__spectrum.cpp46
2 files changed, 49 insertions, 3 deletions
diff --git a/audio/qaudiosonar/Makefile b/audio/qaudiosonar/Makefile
index 4e188c04a59b..9b3f67dff225 100644
--- a/audio/qaudiosonar/Makefile
+++ b/audio/qaudiosonar/Makefile
@@ -1,7 +1,7 @@
PORTNAME= qaudiosonar
DISTVERSIONPREFIX= v
DISTVERSION= 1.8.3
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= audio
MAINTAINER= ports@FreeBSD.org
@@ -12,9 +12,9 @@ LICENSE= BSD2CLAUSE
LIB_DEPENDS= libjack.so:audio/jack
-USES= compiler:c++11-lang gl qmake qt:5 tar:bzip2
+USES= compiler:c++17-lang gl qmake qt:6 tar:bzip2
USE_GL= gl
-USE_QT= buildtools:build core gui widgets
+USE_QT= base
USE_GITHUB= yes
GH_ACCOUNT= hselasky
diff --git a/audio/qaudiosonar/files/patch-src_qaudiosonar__spectrum.cpp b/audio/qaudiosonar/files/patch-src_qaudiosonar__spectrum.cpp
new file mode 100644
index 000000000000..8a9dbae60df9
--- /dev/null
+++ b/audio/qaudiosonar/files/patch-src_qaudiosonar__spectrum.cpp
@@ -0,0 +1,46 @@
+--- src/qaudiosonar_spectrum.cpp.orig 2022-11-16 11:15:31 UTC
++++ src/qaudiosonar_spectrum.cpp
+@@ -68,7 +68,7 @@ QasBand :: getText(QMouseEvent *event)
+ QString
+ QasBand :: getText(QMouseEvent *event)
+ {
+- int key = (9 + (12 * event->x()) / width()) % 12;
++ int key = (9 + (12 * event->position().toPoint().x()) / width()) % 12;
+
+ return (QString(qas_key_map[key]).arg(5));
+ }
+@@ -172,7 +172,7 @@ QasBand :: mousePressEvent(QMouseEvent *event)
+ } else if (event->button() == Qt::MiddleButton) {
+ ps->edit->appendPlainText(getText(event));
+ } else if (event->button() == Qt::LeftButton) {
+- ps->edit->appendPlainText(getFullText(event->y()));
++ ps->edit->appendPlainText(getFullText(event->position().toPoint().y()));
+ }
+ event->accept();
+ }
+@@ -270,14 +270,14 @@ QasGraph :: getText(QMouseEvent *event)
+ QasGraph :: getText(QMouseEvent *event)
+ {
+ const QasZoomRange &wc_range = ps->zoom_range[ps->zoom_level];
+- int graph = (3 * event->y()) / height();
++ int graph = (3 * event->position().toPoint().y()) / height();
+ int band;
+ int key;
+
+ switch (graph) {
+ case 0:
+ case 1:
+- band = (qas_num_bands * event->x()) / width();
++ band = (qas_num_bands * event->position().toPoint().x()) / width();
+ if (band > -1 && band < (int)qas_num_bands) {
+ band -= band % QAS_WAVE_STEP;
+ return QString(qas_descr_table[band]) +
+@@ -286,7 +286,7 @@ QasGraph :: getText(QMouseEvent *event)
+ return QString();
+ }
+ default:
+- key = (event->x() * (1 + wc_range.stop - wc_range.start)) / width() + wc_range.start;
++ key = (event->position().toPoint().x() * (1 + wc_range.stop - wc_range.start)) / width() + wc_range.start;
+ /* range check */
+ if (key < 0)
+ key = 0;