1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
https://bugs.gentoo.org/958396
https://github.com/input-leap/input-leap/issues/2221
https://github.com/input-leap/input-leap/pull/2232
From d5c08a2ac8398f5ee6a1b2032e791d5980c47d60 Mon Sep 17 00:00:00 2001
From: Dom Rodriguez <shymega@shymega.org.uk>
Date: Wed, 23 Apr 2025 13:35:11 +0100
Subject: [PATCH] fix(gui): Adjust KeySequence.cpp for Qt > 6.9 change
Based off these comments on #2231.
- https://github.com/input-leap/input-leap/pull/2231#issuecomment-2823052026
- https://github.com/input-leap/input-leap/pull/2231#issuecomment-2824062717
And this patch: https://gist.github.com/sid-code/9131300ee943af1ce5958ee40e527b93
Closes: #2231.
Closes: #2221.
---
src/gui/src/KeySequence.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/gui/src/KeySequence.cpp b/src/gui/src/KeySequence.cpp
index 06a8efcd5..8e1012345 100644
--- a/src/gui/src/KeySequence.cpp
+++ b/src/gui/src/KeySequence.cpp
@@ -237,8 +237,11 @@ QString KeySequence::keyToString(int key)
// representable in ucs2?
if (key < 0x10000)
+#if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0)
+ return QString("\\u%1").arg((uint16_t) QChar(key).toLower().unicode(), 4, 16, QChar('0'));
+#else
return QString("\\u%1").arg(QChar(key).toLower().unicode(), 4, 16, QChar('0'));
-
+#endif
// give up, InputLeap probably won't handle this
return "";
}
|