fix: harden Qt Wayland listener generation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -0,0 +1,11 @@
|
|||||||
|
--- a/src/tools/qtwaylandscanner/qtwaylandscanner.cpp
|
||||||
|
+++ b/src/tools/qtwaylandscanner/qtwaylandscanner.cpp
|
||||||
|
@@ -1294,7 +1294,7 @@ bool Scanner::process()
|
||||||
|
|
||||||
|
printf(" void %s::init_listener()\n", interfaceName);
|
||||||
|
printf(" {\n");
|
||||||
|
- printf(" %s_add_listener(m_%s, &m_%s_listener, this);\n", interfaceName, interfaceName, interfaceName);
|
||||||
|
+ printf(" if (m_%s) %s_add_listener(m_%s, &m_%s_listener, this);\n", interfaceName, interfaceName, interfaceName, interfaceName);
|
||||||
|
printf(" }\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
../../../../local/patches/qtbase/qtwaylandscanner-null-guard-listeners.patch
|
||||||
@@ -4,7 +4,9 @@
|
|||||||
# Redox platform detection and syscall adaptations in redox.patch
|
# Redox platform detection and syscall adaptations in redox.patch
|
||||||
[source]
|
[source]
|
||||||
tar = "https://download.qt.io/official_releases/qt/6.8/6.8.2/submodules/qtbase-everywhere-src-6.8.2.tar.xz"
|
tar = "https://download.qt.io/official_releases/qt/6.8/6.8.2/submodules/qtbase-everywhere-src-6.8.2.tar.xz"
|
||||||
patches = []
|
patches = [
|
||||||
|
"qtwaylandscanner-null-guard-listeners.patch",
|
||||||
|
]
|
||||||
|
|
||||||
[build]
|
[build]
|
||||||
template = "custom"
|
template = "custom"
|
||||||
@@ -129,7 +131,7 @@ done
|
|||||||
# ============================================================
|
# ============================================================
|
||||||
HOST_BUILD="${COOKBOOK_ROOT}/build/qt-host-build"
|
HOST_BUILD="${COOKBOOK_ROOT}/build/qt-host-build"
|
||||||
HOST_QTBASE_BUILD="${COOKBOOK_ROOT}/build/qtbase-host-build"
|
HOST_QTBASE_BUILD="${COOKBOOK_ROOT}/build/qtbase-host-build"
|
||||||
HOST_PROFILE="qtbase-host-6.11.0-gui-xml-wayland-qdbus-host"
|
HOST_PROFILE="qtbase-host-6.11.0-gui-xml-wayland-qdbus-host-listener-guard"
|
||||||
HOST_STAMP="${HOST_BUILD}/.redbear-host-profile"
|
HOST_STAMP="${HOST_BUILD}/.redbear-host-profile"
|
||||||
HOST_PATH="/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl"
|
HOST_PATH="/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl"
|
||||||
python - <<'PY'
|
python - <<'PY'
|
||||||
|
|||||||
Reference in New Issue
Block a user