From 32dfa102b3ea0318b5faba4563b905e325d5725b Mon Sep 17 00:00:00 2001
From: Philipp Zabel
Date: Wed, 26 May 2021 12:37:21 +0200
Subject: [PATCH] qtglrenderer.cc: Add missing QCoreApplication and QEventLoop
includes
This fixes a build error if Qt was build without accessibility support:
../../../../../gstreamer/subprojects/gst-plugins-good/ext/qt/qtglrenderer.cc:
In member function 'bool GstQuickRenderer::init(GstGLContext*, GError**)':
../../../../../gstreamer/subprojects/gst-plugins-good/ext/qt/qtglrenderer.cc:341:13:
error: 'QCoreApplication' was not declared in this scope; did you mean 'QApplication'?
../../../../../gstreamer/subprojects/gst-plugins-good/ext/qt/qtglrenderer.cc:341:31:
error: 'app' was not declared in this scope
../../../../../gstreamer/subprojects/gst-plugins-good/ext/qt/qtglrenderer.cc:341:37:
error: 'QCoreApplication' is not a class, namespace, or enumeration
[...]
../../../../../gstreamer/subprojects/gst-plugins-good/ext/qt/qtglrenderer.cc:458:5:
error: 'QEventLoop' was not declared in this scope; did you mean 'QEvent'?
../../../../../gstreamer/subprojects/gst-plugins-good/ext/qt/qtglrenderer.cc:459:9:
error: 'loop' was not declared in this scope
If accessibility is enabled, the includes for QCoreApplication and QEventLoop
are indirectly pulled via QWidget.
Add the required headers as documented in [1] and [2].
[1] https://doc.qt.io/qt-5/qcoreapplication.html
[2] https://doc.qt.io/qt-5/qeventloop.html
Part-of:
---
subprojects/gst-plugins-good/ext/qt/qtglrenderer.cc | 2 ++
subprojects/gst-plugins-good/ext/qt6/qt6glrenderer.cc | 2 ++
2 files changed, 4 insertions(+)
diff --git a/subprojects/gst-plugins-good/ext/qt/qtglrenderer.cc b/subprojects/gst-plugins-good/ext/qt/qtglrenderer.cc
index ef5270bc85..6eacf2d947 100644
--- a/subprojects/gst-plugins-good/ext/qt/qtglrenderer.cc
+++ b/subprojects/gst-plugins-good/ext/qt/qtglrenderer.cc
@@ -9,6 +9,8 @@
#include
#include
#include
+#include
+#include
#include
#include "gstqtgl.h"
diff --git a/subprojects/gst-plugins-good/ext/qt6/qt6glrenderer.cc b/subprojects/gst-plugins-good/ext/qt6/qt6glrenderer.cc
index 089c9c005b..20b803cdb7 100644
--- a/subprojects/gst-plugins-good/ext/qt6/qt6glrenderer.cc
+++ b/subprojects/gst-plugins-good/ext/qt6/qt6glrenderer.cc
@@ -10,6 +10,8 @@
#include
#include
#include
+#include
+#include
#include
#include "gstqt6gl.h"