Warning, /graphics/krita/3rdparty/ext_qt/0113-Fix-multiple-shortcuts-match-from-different-keyboard.patch is written in an unsupported language. File is not indexed.

0001 From 7e79ef05b9594d5cf8c182acaa5eadd77b55f8bc Mon Sep 17 00:00:00 2001
0002 From: Dmitry Kazakov <dimula73@gmail.com>
0003 Date: Mon, 15 Feb 2021 10:54:35 +0300
0004 Subject: [PATCH 09/43] Fix multiple shortcuts match from different keyboard
0005  layouts
0006 
0007 One key may have different meanings on different layout. Therefore
0008 the key may match to several shortcuts when the user presses one key.
0009 In Qt, latin layout has a priority over the current user layout.
0010 Therefore, if we managed to find a exact match, we shouldn't search
0011 for more possible shortcuts. It'll make them ambiguous.
0012 
0013 See https://bugs.kde.org/show_bug.cgi?id=430479
0014 ---
0015  src/gui/kernel/qshortcutmap.cpp | 9 ++++++++-
0016  1 file changed, 8 insertions(+), 1 deletion(-)
0017 
0018 diff --git a/src/gui/kernel/qshortcutmap.cpp b/src/gui/kernel/qshortcutmap.cpp
0019 index 3bb42c1c0b..32bb175a2b 100644
0020 --- a/src/gui/kernel/qshortcutmap.cpp
0021 +++ b/src/gui/kernel/qshortcutmap.cpp
0022 @@ -498,9 +498,16 @@ QKeySequence::SequenceMatch QShortcutMap::find(QKeyEvent *e, int ignoredModifier
0023          if (oneKSResult && oneKSResult >= result) {
0024              okEntries << d->newEntries.at(i);
0025  #if defined(DEBUG_QSHORTCUTMAP)
0026 -            qDebug() << "Added ok key sequence" << d->newEntries;
0027 +            qDebug() << "Added ok key sequence" << d->newEntries.at(i);
0028  #endif
0029          }
0030 +
0031 +        // If we managed to match some shortcuts from the background
0032 +        // layers, there is no need to try upper layers. Different
0033 +        // layouts may overlap and we consider latin as a priority.
0034 +        if (oneKSResult == QKeySequence::ExactMatch) {
0035 +            break;
0036 +        }
0037      }
0038  
0039      if (d->identicals.size()) {
0040 -- 
0041 2.20.1.windows.1
0042