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>
This commit is contained in:
Friedemann Kleint 2018-03-27 16:15:27 +02:00
parent f69d32b535
commit c3de89740a

View File

@ -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;