summaryrefslogtreecommitdiffstats
path: root/recipes-qt
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2021-02-05 14:29:47 +0200
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2021-02-09 13:57:36 +0000
commitf9599349fb143651e48453fcb8391da3166f3854 (patch)
treeae022ac61d40d31d3368436e9211cf626cf3608d /recipes-qt
parent3744a35d67b6d239b24c84d07f132038c6b2656e (diff)
qtwayland: Mitigate crash when platforminputcontext library is missing
Turns out that in the case a plug-in library is missing (which is the actual root cause of this problem) we do not properly check if it can use it, leading to a crash when attempting to make of use QT_LOGGING_RULES. This patch mitigates that and allows to debug Qt w/ the help of QT_LOGGING_RULES. Bug-AGL: SPEC-3359 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: If8c0f0f030c7ca53aca701a54ceea317cc7fd695
Diffstat (limited to 'recipes-qt')
-rw-r--r--recipes-qt/qt/qtwayland/0001-client-qwaylandintegration-Do-not-attempt-to-use-the.patch37
-rw-r--r--recipes-qt/qt/qtwayland_agldemo.inc1
2 files changed, 38 insertions, 0 deletions
diff --git a/recipes-qt/qt/qtwayland/0001-client-qwaylandintegration-Do-not-attempt-to-use-the.patch b/recipes-qt/qt/qtwayland/0001-client-qwaylandintegration-Do-not-attempt-to-use-the.patch
new file mode 100644
index 000000000..2d578e3b0
--- /dev/null
+++ b/recipes-qt/qt/qtwayland/0001-client-qwaylandintegration-Do-not-attempt-to-use-the.patch
@@ -0,0 +1,37 @@
+From 0c8212273ac0fcd8cd954bd43075901a80ab3476 Mon Sep 17 00:00:00 2001
+From: Marius Vlad <marius.vlad@collabora.com>
+Date: Fri, 29 Jan 2021 12:31:19 +0200
+Subject: [PATCH] client/qwaylandintegration: Do not attempt to use the
+ inputContext()
+
+We assume loading the platforminputcompose library no matter what, but
+in case that doesn't happen (the library effectively not found), no necessary
+checks are made in order to make sure that indeed succeed.
+
+This patch mitigates that, and with it, it allows to use the QT_LOGGING_RULES,
+which is used to trigger the issue.
+
+Bug-AGL: SPEC-3359
+
+Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
+---
+ src/client/qwaylandintegration.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp
+index f6a80e18..5568485c 100644
+--- a/src/client/qwaylandintegration.cpp
++++ b/src/client/qwaylandintegration.cpp
+@@ -503,7 +503,8 @@ void QWaylandIntegration::reconfigureInputContext()
+ // is why we need to check here which input context actually is being used.
+ mDisplay->mUsingInputContextFromCompositor = qobject_cast<QWaylandInputContext *>(mInputContext.data());
+
+- qCDebug(lcQpaWayland) << "using input method:" << inputContext()->metaObject()->className();
++ if (mDisplay->mUsingInputContextFromCompositor)
++ qCDebug(lcQpaWayland) << "using input method:" << inputContext()->metaObject()->className();
+ }
+
+ QWaylandShellIntegration *QWaylandIntegration::createShellIntegration(const QString &integrationName)
+--
+2.28.0
+
diff --git a/recipes-qt/qt/qtwayland_agldemo.inc b/recipes-qt/qt/qtwayland_agldemo.inc
index c75372583..61d0393a5 100644
--- a/recipes-qt/qt/qtwayland_agldemo.inc
+++ b/recipes-qt/qt/qtwayland_agldemo.inc
@@ -14,5 +14,6 @@ FILESEXTRAPATHS_append := ":${THISDIR}/qtwayland"
SRC_URI_append = "\
file://0010-Added-manifest-file-according-to-smack-3-domain-mode.patch \
+ file://0001-client-qwaylandintegration-Do-not-attempt-to-use-the.patch \
"