2d578e3b0e21b2b90d19e140a2dd7d6a3c976b72
[AGL/meta-agl-demo.git] / recipes-qt / qt / qtwayland / 0001-client-qwaylandintegration-Do-not-attempt-to-use-the.patch
1 From 0c8212273ac0fcd8cd954bd43075901a80ab3476 Mon Sep 17 00:00:00 2001
2 From: Marius Vlad <marius.vlad@collabora.com>
3 Date: Fri, 29 Jan 2021 12:31:19 +0200
4 Subject: [PATCH] client/qwaylandintegration: Do not attempt to use the
5  inputContext()
6
7 We assume loading the platforminputcompose library no matter what, but
8 in case that doesn't happen (the library effectively not found), no necessary
9 checks are made in order to make sure that indeed succeed.
10
11 This patch mitigates that, and with it, it allows to use the QT_LOGGING_RULES,
12 which is used to trigger the issue.
13
14 Bug-AGL: SPEC-3359
15
16 Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
17 ---
18  src/client/qwaylandintegration.cpp | 3 ++-
19  1 file changed, 2 insertions(+), 1 deletion(-)
20
21 diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp
22 index f6a80e18..5568485c 100644
23 --- a/src/client/qwaylandintegration.cpp
24 +++ b/src/client/qwaylandintegration.cpp
25 @@ -503,7 +503,8 @@ void QWaylandIntegration::reconfigureInputContext()
26      // is why we need to check here which input context actually is being used.
27      mDisplay->mUsingInputContextFromCompositor = qobject_cast<QWaylandInputContext *>(mInputContext.data());
28  
29 -    qCDebug(lcQpaWayland) << "using input method:" << inputContext()->metaObject()->className();
30 +    if (mDisplay->mUsingInputContextFromCompositor)
31 +           qCDebug(lcQpaWayland) << "using input method:" << inputContext()->metaObject()->className();
32  }
33  
34  QWaylandShellIntegration *QWaylandIntegration::createShellIntegration(const QString &integrationName)
35 -- 
36 2.28.0
37