The QShortcutEvent constructor takes "int shortcutId" as its second
argument, not a bool. Since the default shortcutId is 0, this test
passed, since false == 0.
Change-Id: I43bbae4613f3badb1578dccec76dcdd3c96a3a2f
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
for (int i = 0; i < 4; ++i) {
QKeySequence sequence;
- QShortcutEvent event(sequence, false);
+ // Default shortcutId for QAbstractButton is 0, so the shortcut event will work.
+ QShortcutEvent event(sequence, /*shortcutId*/ 0);
QApplication::sendEvent(&button, &event);
if (i < 2)
QTest::qWait(500);