aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-02-15 10:19:32 -0500
committerDavid Robillard <d@drobilla.net>2021-02-15 10:19:32 -0500
commitf235528015532bc0885330476f2a3b666c4c9a4a (patch)
tree57688e1a1f0169a09fc32cb55c4f65a038851822
parent8952dde02d9d6761ae0cae033600f4a220c8e075 (diff)
downloadjalv-f235528015532bc0885330476f2a3b666c4c9a4a.tar.gz
jalv-f235528015532bc0885330476f2a3b666c4c9a4a.tar.bz2
jalv-f235528015532bc0885330476f2a3b666c4c9a4a.zip
Remove Qt4 support
-rw-r--r--NEWS3
-rw-r--r--src/jalv_qt.cpp74
-rw-r--r--wscript26
3 files changed, 31 insertions, 72 deletions
diff --git a/NEWS b/NEWS
index 9c631f1..57cae99 100644
--- a/NEWS
+++ b/NEWS
@@ -1,8 +1,9 @@
jalv (1.6.7) unstable;
* Fix crash when running jalv without arguments
+ * Remove Qt4 support
- -- David Robillard <d@drobilla.net> Sat, 16 Jan 2021 18:34:23 +0000
+ -- David Robillard <d@drobilla.net> Mon, 15 Feb 2021 15:18:55 +0000
jalv (1.6.6) stable;
diff --git a/src/jalv_qt.cpp b/src/jalv_qt.cpp
index 165ac50..ab528fd 100644
--- a/src/jalv_qt.cpp
+++ b/src/jalv_qt.cpp
@@ -22,38 +22,34 @@
#include <QtGlobal>
-#if QT_VERSION >= 0x050000
-# include <QAction>
-# include <QApplication>
-# include <QDial>
-# include <QFontMetrics>
-# include <QGroupBox>
-# include <QGuiApplication>
-# include <QHBoxLayout>
-# include <QKeySequence>
-# include <QLabel>
-# include <QLayout>
-# include <QLayoutItem>
-# include <QList>
-# include <QMainWindow>
-# include <QMenu>
-# include <QMenuBar>
-# include <QObject>
-# include <QPoint>
-# include <QRect>
-# include <QScreen>
-# include <QScrollArea>
-# include <QSize>
-# include <QSizePolicy>
-# include <QString>
-# include <QStyle>
-# include <QTimer>
-# include <QVBoxLayout>
-# include <QWidget>
-# include <QtCore>
-#else
-# include <QtGui>
-#endif
+#include <QAction>
+#include <QApplication>
+#include <QDial>
+#include <QFontMetrics>
+#include <QGroupBox>
+#include <QGuiApplication>
+#include <QHBoxLayout>
+#include <QKeySequence>
+#include <QLabel>
+#include <QLayout>
+#include <QLayoutItem>
+#include <QList>
+#include <QMainWindow>
+#include <QMenu>
+#include <QMenuBar>
+#include <QObject>
+#include <QPoint>
+#include <QRect>
+#include <QScreen>
+#include <QScrollArea>
+#include <QSize>
+#include <QSizePolicy>
+#include <QString>
+#include <QStyle>
+#include <QTimer>
+#include <QVBoxLayout>
+#include <QWidget>
+#include <QtCore>
#include <algorithm>
#include <cmath>
@@ -347,11 +343,7 @@ private:
std::map<float, const char*> scaleMap;
};
-#if QT_VERSION >= 0x050000
-# include "jalv_qt5_meta.hpp" // IWYU pragma: keep
-#else
-# include "jalv_qt4_meta.hpp" // IWYU pragma: keep
-#endif
+#include "jalv_qt5_meta.hpp" // IWYU pragma: keep
extern "C" {
@@ -367,11 +359,7 @@ jalv_init(int* argc, char*** argv, JalvOptions*)
const char*
jalv_native_ui_type(void)
{
-#if QT_VERSION >= 0x050000
return "http://lv2plug.in/ns/extensions/ui#Qt5UI";
-#else
- return "http://lv2plug.in/ns/extensions/ui#Qt4UI";
-#endif
}
void
@@ -717,11 +705,7 @@ jalv_discover_ui(Jalv*)
float
jalv_ui_refresh_rate(Jalv*)
{
-#if QT_VERSION >= 0x050000
return (float)QGuiApplication::primaryScreen()->refreshRate();
-#else
- return 30.0f;
-#endif
}
int
diff --git a/wscript b/wscript
index ad062c8..c257ab1 100644
--- a/wscript
+++ b/wscript
@@ -30,7 +30,6 @@ def options(ctx):
'no-gtk2': 'do not build Gtk2 GUI',
'no-gtk3': 'do not build Gtk3 GUI',
'no-qt': 'do not build Qt GUI',
- 'no-qt4': 'do not build Qt4 GUI',
'no-qt5': 'do not build Qt5 GUI'})
@@ -144,16 +143,6 @@ def configure(conf):
mandatory=False)
if not Options.options.no_gui and not Options.options.no_qt:
- if not Options.options.no_qt4:
- conf.check_pkg('QtGui >= 4.0.0',
- uselib_store='QT4',
- system=True,
- mandatory=False)
- if conf.env.HAVE_QT4:
- if not conf.find_program('moc-qt4', var='MOC4',
- mandatory=False):
- conf.find_program('moc', var='MOC4')
-
if not Options.options.no_qt5:
conf.check_pkg('Qt5Widgets >= 5.1.0',
uselib_store='QT5',
@@ -167,7 +156,6 @@ def configure(conf):
have_gui = (conf.env.HAVE_GTK2 or
conf.env.HAVE_GTKMM2 or
conf.env.HAVE_GTK3 or
- conf.env.HAVE_QT4 or
conf.env.HAVE_QT5)
if have_gui:
@@ -240,7 +228,6 @@ def configure(conf):
'Gtk 2.0 support': bool(conf.env.HAVE_GTK2),
'Gtk 3.0 support': bool(conf.env.HAVE_GTK3),
'Gtkmm 2.0 support': bool(conf.env.HAVE_GTKMM2),
- 'Qt 4.0 support': bool(conf.env.HAVE_QT4),
'Qt 5.0 support': bool(conf.env.HAVE_QT5),
'Color output': bool(conf.env.JALV_WITH_COLOR)})
@@ -312,19 +299,6 @@ def build(bld):
uselib = libs + ' GTKMM2',
install_path = '${BINDIR}')
- # Qt4 version
- if bld.env.HAVE_QT4:
- obj = bld(rule = '${MOC4} ${SRC} > ${TGT}',
- source = 'src/jalv_qt.cpp',
- target = 'jalv_qt4_meta.hpp')
- obj = bld(features = 'c cxx cxxprogram',
- source = source + ' src/jalv_qt.cpp',
- target = 'jalv.qt4',
- includes = ['.', 'src'],
- lib = ['pthread'],
- uselib = libs + ' QT4',
- install_path = '${BINDIR}')
-
# Qt5 version
if bld.env.HAVE_QT5:
obj = bld(rule = '${MOC5} ${SRC} > ${TGT}',