summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qshortcutmap.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-03-27 16:15:27 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-03-28 11:58:42 +0000
commitc3de89740a9fadacf7504e76ab61b9a4586ac60b (patch)
tree13951076989cd1549498141f32ddb1fea4670ee4 /src/gui/kernel/qshortcutmap.cpp
parentf69d32b535d456a2441754ef5733c7fb65411d6c (diff)
QShortcutMap::createNewSequences: Add some debug output
Output the keys obtained from QPlatformIntegration::possibleKeys() which is often at the core of bugs in this area. Change-Id: I8c739a4c3251a7f6112a4032e0e1b9db9d2ca641 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/gui/kernel/qshortcutmap.cpp')
-rw-r--r--src/gui/kernel/qshortcutmap.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/kernel/qshortcutmap.cpp b/src/gui/kernel/qshortcutmap.cpp
index 6c19eab287..8e09c97806 100644
--- a/src/gui/kernel/qshortcutmap.cpp
+++ b/src/gui/kernel/qshortcutmap.cpp
@@ -540,6 +540,19 @@ void QShortcutMap::createNewSequences(QKeyEvent *e, QVector<QKeySequence> &ksl,
{
Q_D(QShortcutMap);
QList<int> possibleKeys = QKeyMapper::possibleKeys(e);
+#if defined(DEBUG_QSHORTCUTMAP)
+ {
+ QDebug debug = qDebug().nospace();
+ debug << __FUNCTION__ << '(' << e << ", ignoredModifiers="
+ << Qt::KeyboardModifiers(ignoredModifiers) << "), possibleKeys=(";
+ for (int i = 0, size = possibleKeys.size(); i < size; ++i) {
+ if (i)
+ debug << ", ";
+ debug << QKeySequence(possibleKeys.at(i));
+ }
+ debug << ')';
+ }
+#endif // DEBUG_QSHORTCUTMAP
int pkTotal = possibleKeys.count();
if (!pkTotal)
return;