diff options
-rw-r--r-- | recipes-qt/qt5/qtwayland-native_git.bb | 1 | ||||
-rw-r--r-- | recipes-qt/qt5/qtwayland/0001-Fix-building-of-QWaylandIntegration-if-some-Qt5-feat.patch | 156 | ||||
-rw-r--r-- | recipes-qt/qt5/qtwayland_git.bb | 1 |
3 files changed, 158 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtwayland-native_git.bb b/recipes-qt/qt5/qtwayland-native_git.bb index a214346a..1149aa5b 100644 --- a/recipes-qt/qt5/qtwayland-native_git.bb +++ b/recipes-qt/qt5/qtwayland-native_git.bb | |||
@@ -18,6 +18,7 @@ DEPENDS = "qtbase-native wayland-native" | |||
18 | 18 | ||
19 | SRC_URI += " \ | 19 | SRC_URI += " \ |
20 | file://0001-Install-the-qtwaylandscanner-tool-to-the-native-side.patch \ | 20 | file://0001-Install-the-qtwaylandscanner-tool-to-the-native-side.patch \ |
21 | file://0001-Fix-building-of-QWaylandIntegration-if-some-Qt5-feat.patch \ | ||
21 | " | 22 | " |
22 | 23 | ||
23 | do_configure() { | 24 | do_configure() { |
diff --git a/recipes-qt/qt5/qtwayland/0001-Fix-building-of-QWaylandIntegration-if-some-Qt5-feat.patch b/recipes-qt/qt5/qtwayland/0001-Fix-building-of-QWaylandIntegration-if-some-Qt5-feat.patch new file mode 100644 index 00000000..d173e673 --- /dev/null +++ b/recipes-qt/qt5/qtwayland/0001-Fix-building-of-QWaylandIntegration-if-some-Qt5-feat.patch | |||
@@ -0,0 +1,156 @@ | |||
1 | From de85e1c1ee76be845a21b441d9e4ea12a30d84c7 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Vesa=20J=C3=A4=C3=A4skel=C3=A4inen?= <dachaac@gmail.com> | ||
3 | Date: Sun, 18 Sep 2016 11:51:59 +0300 | ||
4 | Subject: [PATCH] Fix building of QWaylandIntegration if some Qt5 features are | ||
5 | disabled. | ||
6 | |||
7 | QPlatformIntegration's interface methods are disabled based on QT_NO_OPENGL, | ||
8 | QT_NO_CLIPBOARD, QT_NO_DRAGANDDROP, QT_NO_ACCESSIBILITY and | ||
9 | QT_NO_SESSIONMANAGER, these has to be taken into account when compiling | ||
10 | QtWayland. | ||
11 | --- | ||
12 | src/client/qwaylandintegration.cpp | 21 ++++++++++++++++++--- | ||
13 | src/client/qwaylandintegration_p.h | 12 ++++++++++++ | ||
14 | 2 files changed, 30 insertions(+), 3 deletions(-) | ||
15 | |||
16 | diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp | ||
17 | index 39fff53..481e3d6 100644 | ||
18 | --- a/src/client/qwaylandintegration.cpp | ||
19 | +++ b/src/client/qwaylandintegration.cpp | ||
20 | @@ -39,7 +39,9 @@ | ||
21 | #include "qwaylandinputcontext_p.h" | ||
22 | #include "qwaylandshmbackingstore_p.h" | ||
23 | #include "qwaylandnativeinterface_p.h" | ||
24 | +#ifndef QT_NO_CLIPBOARD | ||
25 | #include "qwaylandclipboard_p.h" | ||
26 | +#endif | ||
27 | #include "qwaylanddnd_p.h" | ||
28 | #include "qwaylandwindowmanagerintegration_p.h" | ||
29 | #include "qwaylandscreen_p.h" | ||
30 | @@ -57,7 +59,9 @@ | ||
31 | #include <QSocketNotifier> | ||
32 | |||
33 | #include <qpa/qplatforminputcontextfactory_p.h> | ||
34 | +#ifndef QT_NO_ACCESSIBILITY | ||
35 | #include <qpa/qplatformaccessibility.h> | ||
36 | +#endif | ||
37 | #include <qpa/qplatforminputcontext.h> | ||
38 | |||
39 | #include "qwaylandhardwareintegration_p.h" | ||
40 | @@ -117,8 +121,6 @@ QWaylandIntegration::QWaylandIntegration() | ||
41 | , mNativeInterface(new QWaylandNativeInterface(this)) | ||
42 | #ifndef QT_NO_ACCESSIBILITY | ||
43 | , mAccessibility(new QPlatformAccessibility()) | ||
44 | -#else | ||
45 | - , mAccessibility(0) | ||
46 | #endif | ||
47 | , mClientBufferIntegrationInitialized(false) | ||
48 | , mServerBufferIntegrationInitialized(false) | ||
49 | @@ -126,9 +128,12 @@ QWaylandIntegration::QWaylandIntegration() | ||
50 | { | ||
51 | initializeInputDeviceIntegration(); | ||
52 | mDisplay = new QWaylandDisplay(this); | ||
53 | +#ifndef QT_NO_CLIPBOARD | ||
54 | mClipboard = new QWaylandClipboard(mDisplay); | ||
55 | +#endif | ||
56 | +#ifndef QT_NO_DRAGANDDROP | ||
57 | mDrag = new QWaylandDrag(mDisplay); | ||
58 | - | ||
59 | +#endif | ||
60 | QString icStr = QPlatformInputContextFactory::requested(); | ||
61 | icStr.isNull() ? mInputContext.reset(new QWaylandInputContext(mDisplay)) | ||
62 | : mInputContext.reset(QPlatformInputContextFactory::create(icStr)); | ||
63 | @@ -136,8 +141,12 @@ QWaylandIntegration::QWaylandIntegration() | ||
64 | |||
65 | QWaylandIntegration::~QWaylandIntegration() | ||
66 | { | ||
67 | +#ifndef QT_NO_DRAGANDDROP | ||
68 | delete mDrag; | ||
69 | +#endif | ||
70 | +#ifndef QT_NO_CLIPBOARD | ||
71 | delete mClipboard; | ||
72 | +#endif | ||
73 | #ifndef QT_NO_ACCESSIBILITY | ||
74 | delete mAccessibility; | ||
75 | #endif | ||
76 | @@ -213,15 +222,19 @@ QPlatformFontDatabase *QWaylandIntegration::fontDatabase() const | ||
77 | return mFontDb; | ||
78 | } | ||
79 | |||
80 | +#ifndef QT_NO_CLIPBOARD | ||
81 | QPlatformClipboard *QWaylandIntegration::clipboard() const | ||
82 | { | ||
83 | return mClipboard; | ||
84 | } | ||
85 | +#endif | ||
86 | |||
87 | +#ifndef QT_NO_DRAGANDDROP | ||
88 | QPlatformDrag *QWaylandIntegration::drag() const | ||
89 | { | ||
90 | return mDrag; | ||
91 | } | ||
92 | +#endif | ||
93 | |||
94 | QPlatformInputContext *QWaylandIntegration::inputContext() const | ||
95 | { | ||
96 | @@ -243,10 +256,12 @@ QVariant QWaylandIntegration::styleHint(StyleHint hint) const | ||
97 | return QPlatformIntegration::styleHint(hint); | ||
98 | } | ||
99 | |||
100 | +#ifndef QT_NO_ACCESSIBILITY | ||
101 | QPlatformAccessibility *QWaylandIntegration::accessibility() const | ||
102 | { | ||
103 | return mAccessibility; | ||
104 | } | ||
105 | +#endif | ||
106 | |||
107 | QPlatformServices *QWaylandIntegration::services() const | ||
108 | { | ||
109 | diff --git a/src/client/qwaylandintegration_p.h b/src/client/qwaylandintegration_p.h | ||
110 | index 987d805..b50ad95 100644 | ||
111 | --- a/src/client/qwaylandintegration_p.h | ||
112 | +++ b/src/client/qwaylandintegration_p.h | ||
113 | @@ -80,15 +80,21 @@ public: | ||
114 | |||
115 | QPlatformNativeInterface *nativeInterface() const Q_DECL_OVERRIDE; | ||
116 | |||
117 | +#ifndef QT_NO_CLIPBOARD | ||
118 | QPlatformClipboard *clipboard() const Q_DECL_OVERRIDE; | ||
119 | +#endif | ||
120 | |||
121 | +#ifndef QT_NO_DRAGANDDROP | ||
122 | QPlatformDrag *drag() const Q_DECL_OVERRIDE; | ||
123 | +#endif | ||
124 | |||
125 | QPlatformInputContext *inputContext() const Q_DECL_OVERRIDE; | ||
126 | |||
127 | QVariant styleHint(StyleHint hint) const Q_DECL_OVERRIDE; | ||
128 | |||
129 | +#ifndef QT_NO_ACCESSIBILITY | ||
130 | QPlatformAccessibility *accessibility() const Q_DECL_OVERRIDE; | ||
131 | +#endif | ||
132 | |||
133 | QPlatformServices *services() const Q_DECL_OVERRIDE; | ||
134 | |||
135 | @@ -117,12 +123,18 @@ private: | ||
136 | void initializeInputDeviceIntegration(); | ||
137 | |||
138 | QPlatformFontDatabase *mFontDb; | ||
139 | +#ifndef QT_NO_CLIPBOARD | ||
140 | QPlatformClipboard *mClipboard; | ||
141 | +#endif | ||
142 | +#ifndef QT_NO_DRAGANDDROP | ||
143 | QPlatformDrag *mDrag; | ||
144 | +#endif | ||
145 | QWaylandDisplay *mDisplay; | ||
146 | QPlatformNativeInterface *mNativeInterface; | ||
147 | QScopedPointer<QPlatformInputContext> mInputContext; | ||
148 | +#ifndef QT_NO_ACCESSIBILITY | ||
149 | QPlatformAccessibility *mAccessibility; | ||
150 | +#endif | ||
151 | bool mClientBufferIntegrationInitialized; | ||
152 | bool mServerBufferIntegrationInitialized; | ||
153 | bool mShellIntegrationInitialized; | ||
154 | -- | ||
155 | 2.7.4 | ||
156 | |||
diff --git a/recipes-qt/qt5/qtwayland_git.bb b/recipes-qt/qt5/qtwayland_git.bb index b208961c..e315924c 100644 --- a/recipes-qt/qt5/qtwayland_git.bb +++ b/recipes-qt/qt5/qtwayland_git.bb | |||
@@ -46,6 +46,7 @@ FILES_${PN}-plugins-dbg += " \ | |||
46 | 46 | ||
47 | SRC_URI += " \ | 47 | SRC_URI += " \ |
48 | file://0001-examples-wayland-include-server-buffer-only-when-bui.patch \ | 48 | file://0001-examples-wayland-include-server-buffer-only-when-bui.patch \ |
49 | file://0001-Fix-building-of-QWaylandIntegration-if-some-Qt5-feat.patch \ | ||
49 | " | 50 | " |
50 | 51 | ||
51 | SRCREV = "a172672484b9496819e588b51ac2ff9fb4a21941" | 52 | SRCREV = "a172672484b9496819e588b51ac2ff9fb4a21941" |