From c3de89740a9fadacf7504e76ab61b9a4586ac60b Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 27 Mar 2018 16:15:27 +0200 Subject: 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 --- src/gui/kernel/qshortcutmap.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/gui/kernel/qshortcutmap.cpp') 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 &ksl, { Q_D(QShortcutMap); QList 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; -- cgit v1.2.3