From 4f4f858ec102136d19ebb5414b23d45d8a54b18e Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Fri, 29 Jan 2021 18:34:58 -0800 Subject: [PATCH] Update to QT5 Qt 4 has been unsupported and unmaintained for years, and isn't packaged for many Linux distros any more. Luckily porting QT4 to QT5 is generally not too hard, and fairly well documented. In this case, quite trivial. This seems to be working nicely, though I've only tested on Linux. Fixes https://github.com/ccrma/miniAudicle/issues/40 and https://github.com/ccrma/miniAudicle/issues/41. --- notes/README.linux | 6 +++--- src/makefile | 4 ++-- src/miniAudicle.pro | 4 ++-- src/qt/mAVMMonitor.cpp | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/notes/README.linux b/notes/README.linux index 1a683b48..36b06cbd 100644 --- a/notes/README.linux +++ b/notes/README.linux @@ -31,8 +31,8 @@ bison flex libasound2-dev libsndfile1-dev -libqt4-dev -libqscintilla2-dev +qtbase5-dev +libqscintilla2-qt5-dev libpulse-dev (linux-pulse only) libjack-jackd2-dev (linux-jack only) @@ -40,7 +40,7 @@ On systems with apt-get available, running the following command with the full list of packages will ensure that all necessary packages are installed. $ sudo apt-get install make gcc g++ bison flex libasound2-dev libsndfile1-dev \ - libqt4-dev libqscintilla2-dev [libpulse-dev] [libjack-jackd2-dev] + qtbase5-dev libqscintilla2-qt5-dev [libpulse-dev] [libjack-jackd2-dev] Tips diff --git a/src/makefile b/src/makefile index a93ecdf3..9ad6dda4 100644 --- a/src/makefile +++ b/src/makefile @@ -5,8 +5,8 @@ PREFIX=/usr CHUCK_SRC_DIR=chuck/src -ifneq ($(shell which qmake-qt4),) -QMAKE?=qmake-qt4 +ifneq ($(shell which qmake-qt5),) +QMAKE?=qmake-qt5 else QMAKE?=qmake endif diff --git a/src/miniAudicle.pro b/src/miniAudicle.pro index 1531654b..0db136f4 100755 --- a/src/miniAudicle.pro +++ b/src/miniAudicle.pro @@ -4,7 +4,7 @@ # #------------------------------------------------- -QT += core gui network +QT += core widgets gui network CONFIG += warn_off @@ -23,7 +23,7 @@ OBJECTS_DIR = build PRECOMPILED_HEADER = qt/miniAudicle_pc.h -LIBS += -lqscintilla2 +CONFIG += qscintilla2 DEFINES += HAVE_CONFIG_H diff --git a/src/qt/mAVMMonitor.cpp b/src/qt/mAVMMonitor.cpp index 1837c33d..6d3e494c 100755 --- a/src/qt/mAVMMonitor.cpp +++ b/src/qt/mAVMMonitor.cpp @@ -64,7 +64,7 @@ mAVMMonitor::mAVMMonitor(QWidget *parent, mAMainWindow *mainWindow, miniAudicle ui->tableWidget->setColumnWidth(2, 48); ui->tableWidget->setColumnWidth(3, 24); - ui->tableWidget->horizontalHeader()->setResizeMode(1, QHeaderView::Stretch); + ui->tableWidget->horizontalHeader()->setSectionResizeMode(1, QHeaderView::Stretch); } mAVMMonitor::~mAVMMonitor()