summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2023-10-10 14:08:48 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-10-11 07:58:03 +0000
commitbcdec67cd2e8063aca6beed6b301e47974bcd2ce (patch)
treeb9d7b47fc3683ed2079fb446a73aaebc2da0145c
parent819e52db0d9469737d9932fda8672eb9217996e1 (diff)
xkb: fix build with libxkbcommon 1.6.0 and later
A few XKB_KEY_dead_* defines got removed from 1.6.0. See also https://github.com/xkbcommon/libxkbcommon/blob/6073565903488cb5b9a8d37fdc4a7c2f9d7ad04d/NEWS#L9-L14 https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/70/diffs?commit_id=cb44799b72f611eb4c9d7cc185bc3b09e070be08 Pick-to: 6.2 5.15 Fixes: QTBUG-117950 Change-Id: I55861868f2bb29c553d68365fa9b9b6ed01c9aea Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 8af35d27e8f02bbb99aef4ac495ed406e50e3cca) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit f3fbd07f7a180b58db8025c5165e42b7ea3390c2)
-rw-r--r--src/gui/platform/unix/qxkbcommon.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/platform/unix/qxkbcommon.cpp b/src/gui/platform/unix/qxkbcommon.cpp
index 2fa2ae8911..394407e403 100644
--- a/src/gui/platform/unix/qxkbcommon.cpp
+++ b/src/gui/platform/unix/qxkbcommon.cpp
@@ -239,10 +239,14 @@ static constexpr const auto KeyTbl = qMakeArray(
Xkb2Qt<XKB_KEY_dead_small_schwa, Qt::Key_Dead_Small_Schwa>,
Xkb2Qt<XKB_KEY_dead_capital_schwa, Qt::Key_Dead_Capital_Schwa>,
Xkb2Qt<XKB_KEY_dead_greek, Qt::Key_Dead_Greek>,
+/* The following four XKB_KEY_dead keys got removed in libxkbcommon 1.6.0
+ The define check is kind of version check here. */
+#ifdef XKB_KEY_dead_lowline
Xkb2Qt<XKB_KEY_dead_lowline, Qt::Key_Dead_Lowline>,
Xkb2Qt<XKB_KEY_dead_aboveverticalline, Qt::Key_Dead_Aboveverticalline>,
Xkb2Qt<XKB_KEY_dead_belowverticalline, Qt::Key_Dead_Belowverticalline>,
Xkb2Qt<XKB_KEY_dead_longsolidusoverlay, Qt::Key_Dead_Longsolidusoverlay>,
+#endif
// Special keys from X.org - This include multimedia keys,
// wireless/bluetooth/uwb keys, special launcher keys, etc.