qtractor: Fix build with Qt 5.11

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
This commit is contained in:
Andreas Müller
2018-06-03 22:36:57 +02:00
parent 663350b6c2
commit cbc4158257
2 changed files with 93 additions and 0 deletions

View File

@@ -0,0 +1,92 @@
From 99e6edad2d7d06bdd796b2c613fa6d9a243e92f1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Sun, 3 Jun 2018 21:46:26 +0200
Subject: [PATCH] Add includes to fix build with Qt 5.11
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
While at it use preferred <> instread of "".
Fixes:
| In file included from ../../recipe-sysroot/usr/include/qt5/QtWidgets/qradiobutton.h:44:0,
| from ../../recipe-sysroot/usr/include/qt5/QtWidgets/QRadioButton:1,
| from .ui/ui_qtractorMidiImportForm.h:44,
| from qtractorMidiImportForm.h:25,
| from qtractorMidiImportForm.cpp:22:
| ../../recipe-sysroot/usr/include/qt5/QtWidgets/qabstractbutton.h:53:7: note: forward declaration of 'class QButtonGroup'
| class QButtonGroup;
| ^~~~~~~~~~~~
| qtractorMidiImportForm.cpp:195:88: error: invalid use of incomplete type 'class QButtonGroup'
| ...
and
| In file included from ../../recipe-sysroot/usr/include/qt5/QtGui/qwindowdefs.h:44:0,
| from ../../recipe-sysroot/usr/include/qt5/QtWidgets/qwidget.h:44,
| from ../../recipe-sysroot/usr/include/qt5/QtWidgets/qframe.h:44,
| from ../../recipe-sysroot/usr/include/qt5/QtWidgets/QFrame:1,
| from qtractorMeter.h:25,
| from qtractorMeter.cpp:23:
| ../../recipe-sysroot/usr/include/qt5/QtCore/qobjectdefs.h: In instantiation of 'struct QtPrivate::HasQ_OBJECT_Macro<QAction>':
| ../../recipe-sysroot/usr/include/qt5/QtCore/qobject.h:502:5: required from 'T qobject_cast(QObject*) [with T = QAction*]'
| qtractorMeter.cpp:431:42: required from here
| ../../recipe-sysroot/usr/include/qt5/QtCore/qobjectdefs.h:622:37: error: incomplete type 'QAction' used in nested name specifier
| enum { Value = sizeof(test(&Object::qt_metacall)) == sizeof(int) };
| ^~~~~~~
| ...
A similar patch was submitted in [1] - our special midiimportx branch needs a
further pull request.
[1] https://github.com/rncbc/qtractor/pull/156
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
src/qtractorMeter.cpp | 1 +
src/qtractorMidiImportForm.cpp | 3 ++-
src/qtractorTrackButton.h | 1 +
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/qtractorMeter.cpp b/src/qtractorMeter.cpp
index d1b826c5..999e0ae3 100644
--- a/src/qtractorMeter.cpp
+++ b/src/qtractorMeter.cpp
@@ -33,6 +33,7 @@
#include <QVBoxLayout>
#include <QPainter>
#include <QLabel>
+#include <QAction>
#include <QPaintEvent>
#include <QResizeEvent>
diff --git a/src/qtractorMidiImportForm.cpp b/src/qtractorMidiImportForm.cpp
index e04efb51..b22557f8 100644
--- a/src/qtractorMidiImportForm.cpp
+++ b/src/qtractorMidiImportForm.cpp
@@ -28,7 +28,8 @@
#include "qtractorFiles.h"
#include "qtractorCommand.h"
#include "qtractorInstrument.h"
-#include "QPushButton"
+#include <QPushButton>
+#include <QButtonGroup>
//----------------------------------------------------------------------
diff --git a/src/qtractorTrackButton.h b/src/qtractorTrackButton.h
index dedd2933..8ec801f0 100644
--- a/src/qtractorTrackButton.h
+++ b/src/qtractorTrackButton.h
@@ -25,6 +25,7 @@
#include "qtractorTrack.h"
#include <QPushButton>
+#include <QAction>
#include "qtractorObserverWidget.h"
--
2.14.3

View File

@@ -24,6 +24,7 @@ SRC_URI = " \
file://0001-do-nor-try-run-for-float-sse-detection.patch \
file://0002-do-nor-try-run-for-suil-libs-detection.patch \
file://0003-Add-ARM-NEON-acceleration-for-time-stretch-not-yet-t.patch \
file://0004-Add-includes-to-fix-build-with-Qt-5.11.patch \
file://Qtractor.conf \
"
SRCREV = "e190588b89862d4de5953544035e91f58417225e"