Support more verbose debug output for QKeyEvent

Sometimes it's useful to know the scan code and virtual key as well.

Change-Id: Ic120189470a9ff44a5cb7f6dcc1405654136424f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
Tor Arne Vestbø 2023-09-21 14:21:00 +02:00
parent e25c773f2b
commit d50bf18726

View File

@ -4125,6 +4125,10 @@ QDebug operator<<(QDebug dbg, const QEvent *e)
dbg << ", text=" << ke->text();
if (ke->isAutoRepeat())
dbg << ", autorepeat, count=" << ke->count();
if (dbg.verbosity() > QDebug::DefaultVerbosity) {
dbg << ", nativeScanCode=" << ke->nativeScanCode();
dbg << ", nativeVirtualKey=" << ke->nativeVirtualKey();
}
dbg << ')';
}
break;