Skip to content

Commit bb2a0bb

Browse files
author
Michal Klocek
committed
Fix detection of ozone x11 support
Fixes: QTBUG-77011 Change-Id: I0136b360c74970b912124f6f308f598c80eceba3 Reviewed-by: Allan Sandfeld Jensen <[email protected]>
1 parent d35cd07 commit bb2a0bb

File tree

6 files changed

+25
-21
lines changed

6 files changed

+25
-21
lines changed

mkspecs/features/configure.prf

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,9 @@ defineTest(runConfigure) {
9494
}
9595
}
9696

97-
!qtConfig(webengine-embedded-build): qtConfig(xcb) {
98-
for(package, $$list("libdrm xcomposite xcursor xi xtst")) {
99-
!qtConfig(webengine-system-$$package) {
100-
skipBuild("A suitable version of $$package could not be found.")
101-
return(false)
102-
}
103-
}
97+
!qtConfig(webengine-embedded-build): qtConfig(xcb) : !qtConfig(webengine-ozone-x11) {
98+
skipBuild("Could not find all necessary libraries for qpa-xcb support")
99+
return(false)
104100
}
105101
}
106102
}

mkspecs/features/functions.prf

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,3 @@ defineReplace(pkgConfigHostExecutable) {
121121
return($$system_quote($$system_path($$wrapper_name)))
122122
}
123123

124-
defineTest(hasX11Dependencies) {
125-
for(package, $$list("libdrm xcomposite xcursor xi xtst")) {
126-
!qtConfig(webengine-system-$$package) {
127-
return(false)
128-
}
129-
}
130-
return(true)
131-
}

src/core/config/linux.pri

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ host_build {
175175
}
176176
!packagesExist(libpci): gn_args += use_libpci=false
177177

178-
qtConfig(webengine-system-x11): hasX11Dependencies() {
178+
qtConfig(webengine-ozone-x11) {
179179
gn_args += ozone_platform_x11=true
180180
packagesExist(xscrnsaver): gn_args += use_xscrnsaver=true
181181
}

src/core/configure.json

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,17 @@
642642
"condition": "config.unix && libs.webengine-x11",
643643
"output": [ "privateFeature" ]
644644
},
645+
"webengine-ozone-x11" : {
646+
"label": "Support qpa-xcb",
647+
"condition": "config.unix
648+
&& features.webengine-system-x11
649+
&& features.webengine-system-libdrm
650+
&& features.webengine-system-xcomposite
651+
&& features.webengine-system-xcursor
652+
&& features.webengine-system-xi
653+
&& features.webengine-system-xtst",
654+
"output": [ "privateFeature" ]
655+
},
645656
"webengine-sanitizer" : {
646657
"label": "Sanitizer",
647658
"autoDetect": "config.sanitizer && tests.webengine-sanitizer",
@@ -730,6 +741,11 @@
730741
"webengine-webchannel",
731742
"webengine-v8-snapshot",
732743
"webengine-kerberos",
744+
{
745+
"type": "feature",
746+
"args": "webengine-ozone-x11",
747+
"condition": "config.unix"
748+
},
733749
{
734750
"type": "feature",
735751
"args": "webengine-v8-snapshot-support",
@@ -802,8 +818,7 @@
802818
"webengine-system-png",
803819
"webengine-system-jpeg",
804820
"webengine-system-harfbuzz",
805-
"webengine-system-freetype",
806-
"webengine-system-x11"
821+
"webengine-system-freetype"
807822
]
808823
},
809824
{
@@ -821,6 +836,7 @@
821836
"section": "Required system libraries for qpa-xcb",
822837
"condition": "config.unix && !config.macos",
823838
"entries": [
839+
"webengine-system-x11",
824840
"webengine-system-libdrm",
825841
"webengine-system-xcomposite",
826842
"webengine-system-xcursor",

src/core/core_chromium.pri

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ HEADERS = \
219219
web_event_factory.h
220220

221221

222-
qtConfig(webengine-system-x11): hasX11Dependencies() {
222+
qtConfig(webengine-ozone-x11) {
223223
HEADERS += ozone/gl_ozone_glx_qt.h \
224224
ozone/gl_surface_glx_qt.h
225225
SOURCES += ozone/gl_surface_glx_qt.cpp \

src/core/ozone/surface_factory_qt.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
#include "qtwebenginecoreglobal_p.h"
4242
#include "gl_context_qt.h"
4343
#include "gl_ozone_egl_qt.h"
44-
#if QT_CONFIG(webengine_system_x11)
44+
#if QT_CONFIG(webengine_ozone_x11)
4545
#include "gl_ozone_glx_qt.h"
4646
#endif
4747

@@ -58,7 +58,7 @@ namespace QtWebEngineCore {
5858
SurfaceFactoryQt::SurfaceFactoryQt()
5959
{
6060
Q_ASSERT(qApp);
61-
#if QT_CONFIG(webengine_system_x11)
61+
#if QT_CONFIG(webengine_ozone_x11)
6262
if (GLContextHelper::getGlXConfig()) {
6363
m_impl = gl::kGLImplementationDesktopGL;
6464
m_ozone.reset(new ui::GLOzoneGLXQt());

0 commit comments

Comments
 (0)