Pass correct argument to QShortcutEvent ctor in tst_qabstractbutton.cpp
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>bb10
parent
ed116aa3b3
commit
63bc298fb3
|
|
@ -544,7 +544,8 @@ void tst_QAbstractButton::shortcutEvents()
|
|||
|
||||
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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue