summaryrefslogtreecommitdiffstats
path: root/meta/recipes-webos/qt5/qtwayland/qt2.patch
blob: e741064316446cfee9e7289d3027ceed924f4fec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
From f71dd7f1a74437b0f62c718ee30e53a0e4788d26 Mon Sep 17 00:00:00 2001
From: Valery Volgutov <valery.volgutov@lge.com>
Date: Mon, 22 Jan 2018 12:54:08 +0300
Subject: [PATCH] QtWayland compile error fix on Qt 5.9

:Release Notes:

:Detailed Notes:
!!! Need to change meta-qt5 !!!
============================================================
meta-qt5/classes/qmake5_base.bbclass
============================================================
-    CMD="${OE_QMAKE_QMAKE} -makefile -o Makefile ${OE_QMAKE_DEBUG_OUTPUT} ${OE_QMAKE_RECURSIVE} $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST -- $QMAKE_VARSUBST_CONFIGURE"
-    ${OE_QMAKE_QMAKE} -makefile -o Makefile ${OE_QMAKE_DEBUG_OUTPUT} ${OE_QMAKE_RECURSIVE} $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST -- $QMAKE_VARSUBST_CONFIGURE || die "Error calling $CMD"
+    CMD="${OE_QMAKE_QMAKE} -makefile -o Makefile ${OE_QMAKE_DEBUG_OUTPUT} ${OE_QMAKE_RECURSIVE} $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST"
+    ${OE_QMAKE_QMAKE} -makefile -o Makefile ${OE_QMAKE_DEBUG_OUTPUT} ${OE_QMAKE_RECURSIVE} $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST || die "Error calling $CMD"
============================================================
============================================================

:Testing Performed:

:QA Notes:

:Issues Addressed:
[PLAT-49438] Fix compile own Qt components on Qt 5.9

Change-Id: I9728c41910be3a9245849ccda4c21d6c811ef500
---
 src/client/client.pro                               | 14 +++++++++++++-
 src/client/qwaylandintegration.cpp                  | 12 +++++++++---
 .../client/wayland-egl/qwaylandeglwindow.cpp        |  6 +++++-
 .../client/wayland-egl/qwaylandglcontext.cpp        | 21 ++++++++++++++++++---
 .../client/wayland-egl/qwaylandglcontext.h          |  6 ++++--
 5 files changed, 49 insertions(+), 10 deletions(-)

diff --git a/src/client/client.pro b/src/client/client.pro
index 13bcd6f..14a2e30 100644
--- a/src/client/client.pro
+++ b/src/client/client.pro
@@ -1,6 +1,18 @@
 TARGET = QtWaylandClient
+
 QT += core-private gui-private
-QT_FOR_PRIVATE += platformsupport-private
+
+equals(QT_MAJOR_VERSION,5) {
+    lessThan(QT_MINOR_VERSION, 8) {
+        QT_FOR_PRIVATE += platformsupport-private
+    }
+    else {
+        QT += egl_support-private
+        QT += fontdatabase_support-private
+        QT += eventdispatcher_support-private
+        QT += theme_support-private
+    }
+}
 
 MODULE=waylandclient
 MODULE_PLUGIN_TYPES = wayland-graphics-integration-client wayland-decoration-client wayland-inputdevice-integration
diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp
index df9e7d9..1496260 100644
--- a/src/client/qwaylandintegration.cpp
+++ b/src/client/qwaylandintegration.cpp
@@ -53,9 +53,15 @@
 #include "qwaylandscreen_p.h"
 #include "qwaylandcursor_p.h"
 
-#include "QtPlatformSupport/private/qgenericunixfontdatabase_p.h"
-#include <QtPlatformSupport/private/qgenericunixeventdispatcher_p.h>
-#include <QtPlatformSupport/private/qgenericunixthemes_p.h>
+#if (QT_VERSION < QT_VERSION_CHECK(5, 8, 0))
+    #include "QtPlatformSupport/private/qgenericunixfontdatabase_p.h"
+    #include <QtPlatformSupport/private/qgenericunixeventdispatcher_p.h>
+    #include <QtPlatformSupport/private/qgenericunixthemes_p.h>
+#else
+    #include "QtFontDatabaseSupport/private/qgenericunixfontdatabase_p.h"
+    #include <QtEventDispatcherSupport/private/qgenericunixeventdispatcher_p.h>
+    #include <QtThemeSupport/private/qgenericunixthemes_p.h>
+#endif
 
 #include <QtGui/private/qguiapplication_p.h>
 
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
index 524902a..7f2c83b 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
@@ -44,7 +44,11 @@
 #include <QtWaylandClient/private/qwaylandscreen_p.h>
 #include "qwaylandglcontext.h"
 
-#include <QtPlatformSupport/private/qeglconvenience_p.h>
+#if (QT_VERSION < QT_VERSION_CHECK(5, 8, 0))
+    #include <QtPlatformSupport/private/qeglconvenience_p.h>
+#else
+    #include <QtEglSupport/private/qeglconvenience_p.h>
+#endif
 
 #include <QDebug>
 #include <QtGui/QWindow>
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
index 3c09b62..cc15216 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
@@ -46,11 +46,15 @@
 #include <QtWaylandClient/private/qwaylandabstractdecoration_p.h>
 #include <QtWaylandClient/private/qwaylandintegration_p.h>
 #include "qwaylandeglwindow.h"
-
 #include "qtwaylandclienttracer.h"
-
 #include <QDebug>
-#include <QtPlatformSupport/private/qeglconvenience_p.h>
+
+#if (QT_VERSION < QT_VERSION_CHECK(5, 8, 0))
+    #include <QtPlatformSupport/private/qeglconvenience_p.h>
+#else
+    #include <QtEglSupport/private/qeglconvenience_p.h>
+#endif
+
 #include <QtGui/private/qopenglcontext_p.h>
 #include <QtGui/private/qopengltexturecache_p.h>
 #include <QtGui/private/qguiapplication_p.h>
@@ -545,6 +549,17 @@ void (*QWaylandGLContext::getProcAddress(const QByteArray &procName)) ()
     return eglGetProcAddress(procName.constData());
 }
 
+#if (QT_VERSION > QT_VERSION_CHECK(5, 7, 0))
+QFunctionPointer QWaylandGLContext::getProcAddress(const char *procName)
+{
+    QFunctionPointer proc = (QFunctionPointer) eglGetProcAddress(procName);
+    if (!proc)
+        proc = (QFunctionPointer) dlsym(RTLD_DEFAULT, procName);
+
+    return proc;
+}
+#endif
+
 EGLConfig QWaylandGLContext::eglConfig() const
 {
     return m_config;
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.h b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.h
index eb05411..1ab7706 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.h
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.h
@@ -43,10 +43,9 @@
 #define QWAYLANDGLCONTEXT_H
 
 #include <QtWaylandClient/private/qwaylanddisplay_p.h>
-
 #include <qpa/qplatformopenglcontext.h>
-
 #include "qwaylandeglinclude.h"
+#include <QtGlobal>
 
 QT_BEGIN_NAMESPACE
 
@@ -74,6 +73,9 @@ public:
 
     void (*getProcAddress(const QByteArray &procName)) ();
 
+#if (QT_VERSION > QT_VERSION_CHECK(5, 7, 0))
+    QFunctionPointer getProcAddress(const char *procName);
+#endif
     QSurfaceFormat format() const { return m_format; }
 
     EGLConfig eglConfig() const;
-- 
1.9.1