summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qshortcutmap.cpp
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-09-14 17:33:32 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-09-20 21:20:13 +0200
commite2738ca949d8494e308363b5fbed4cdd091eb7da (patch)
tree8a326bdca8d2f992e839a79cce21185a637f4296 /src/gui/kernel/qshortcutmap.cpp
parentbaac34de6fcbdcc6ee5eb06c3db16c7eda32f121 (diff)
Improve QShortcutMap debug logging
Task-number: QTBUG-116873 Change-Id: I6a2b8c25d3da8c9cbcaeb0979b4be85267ba7856 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Andrey Butirsky <butirsky@gmail.com>
Diffstat (limited to 'src/gui/kernel/qshortcutmap.cpp')
-rw-r--r--src/gui/kernel/qshortcutmap.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/kernel/qshortcutmap.cpp b/src/gui/kernel/qshortcutmap.cpp
index 1849419372d..6e2072b60f3 100644
--- a/src/gui/kernel/qshortcutmap.cpp
+++ b/src/gui/kernel/qshortcutmap.cpp
@@ -392,7 +392,7 @@ QKeySequence::SequenceMatch QShortcutMap::find(QKeyEvent *e, int ignoredModifier
return QKeySequence::NoMatch;
createNewSequences(e, d->newEntries, ignoredModifiers);
- qCDebug(lcShortcutMap) << "Possible shortcut key sequences:" << d->newEntries;
+ qCDebug(lcShortcutMap) << "Possible input sequences:" << d->newEntries;
// Should never happen
if (d->newEntries == d->currentSequences) {
@@ -407,15 +407,15 @@ QKeySequence::SequenceMatch QShortcutMap::find(QKeyEvent *e, int ignoredModifier
bool partialFound = false;
bool identicalDisabledFound = false;
QList<QKeySequence> okEntries;
- int result = QKeySequence::NoMatch;
+ QKeySequence::SequenceMatch result = QKeySequence::NoMatch;
for (int i = d->newEntries.size()-1; i >= 0 ; --i) {
QShortcutEntry entry(d->newEntries.at(i)); // needed for searching
qCDebug(lcShortcutMap) << "- checking entry" << entry.id << entry.keyseq;
const auto itEnd = d->sequences.constEnd();
auto it = std::lower_bound(d->sequences.constBegin(), itEnd, entry);
- int oneKSResult = QKeySequence::NoMatch;
- int tempRes = QKeySequence::NoMatch;
+ QKeySequence::SequenceMatch oneKSResult = QKeySequence::NoMatch;
+ QKeySequence::SequenceMatch tempRes = QKeySequence::NoMatch;
do {
if (it == itEnd)
break;
@@ -469,7 +469,7 @@ QKeySequence::SequenceMatch QShortcutMap::find(QKeyEvent *e, int ignoredModifier
if (result != QKeySequence::NoMatch)
d->currentSequences = okEntries;
qCDebug(lcShortcutMap) << "Returning shortcut match == " << result;
- return QKeySequence::SequenceMatch(result);
+ return result;
}
/*! \internal