commit: e3f3c6aa093aef512cd57eecf3b9b8a4641e402a Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Sat Jun 28 03:59:47 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sat Jun 28 03:59:47 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3f3c6aa
gui-apps/input-leap: fix build w/ qt-6.9 Closes: https://bugs.gentoo.org/958396 Signed-off-by: Sam James <sam <AT> gentoo.org> .../input-leap/files/input-leap-3.0.2-qt-6.9.patch | 40 ++++++++++++++++++++++ gui-apps/input-leap/input-leap-3.0.2-r1.ebuild | 1 + 2 files changed, 41 insertions(+) diff --git a/gui-apps/input-leap/files/input-leap-3.0.2-qt-6.9.patch b/gui-apps/input-leap/files/input-leap-3.0.2-qt-6.9.patch new file mode 100644 index 000000000000..4f7ecf5f8b6c --- /dev/null +++ b/gui-apps/input-leap/files/input-leap-3.0.2-qt-6.9.patch @@ -0,0 +1,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 <[email protected]> +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 ""; + } + diff --git a/gui-apps/input-leap/input-leap-3.0.2-r1.ebuild b/gui-apps/input-leap/input-leap-3.0.2-r1.ebuild index 1d1de4ec1340..f019479d6a4b 100644 --- a/gui-apps/input-leap/input-leap-3.0.2-r1.ebuild +++ b/gui-apps/input-leap/input-leap-3.0.2-r1.ebuild @@ -61,6 +61,7 @@ BDEPEND=" PATCHES=( "${FILESDIR}"/${P}-gui-crash.patch "${DISTDIR}"/${P}-no-x11.patch + "${FILESDIR}"/${P}-qt-6.9.patch ) DOCS=(
