From ce12b4bd3a824f043fbcb5827381340104b92bf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 8 Apr 2022 17:26:20 +0200 Subject: [PATCH] QAppleKeyMapper: Print key via QKeySequence instead of as QChar The keys map beyond the Unicode range, so we can't print them as QChar. Luckily QKeySequence takes care of all of this for us in QKeySequencePrivate::keyName() via QKeySequence::encodeString(). Pick-to: 6.2 6.3 Change-Id: I822c4f925854e22af5a3b4a7028cb0ed18fb67b2 Reviewed-by: Timur Pocheptsov --- src/gui/platform/darwin/qapplekeymapper.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/platform/darwin/qapplekeymapper.mm b/src/gui/platform/darwin/qapplekeymapper.mm index 98c7378e1f..c7994f46f0 100644 --- a/src/gui/platform/darwin/qapplekeymapper.mm +++ b/src/gui/platform/darwin/qapplekeymapper.mm @@ -551,7 +551,7 @@ const QAppleKeyMapper::KeyMap &QAppleKeyMapper::keyMapForKey(VirtualKeyCode virt qCDebug(lcQpaKeyMapper).verbosity(0) << "\t" << qtModifiers << "+" << qUtf8Printable(QString::asprintf("0x%02x", virtualKey)) << "=" << qUtf8Printable(QString::asprintf("%d / 0x%02x /", qtKey, qtKey)) - << QString(QChar(qtKey)); + << QKeySequence(qtKey).toString(); } return keyMap;