diff options
author | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2009-07-07 11:39:43 +0200 |
---|---|---|
committer | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2009-07-07 11:54:03 +0200 |
commit | f70f321c8b5769476796e2bae540a57b3b62c684 (patch) | |
tree | dd6b4cfe816bfcd0b8b881f3fcc72c98ac0ee331 /tests/auto/qaccessibility | |
parent | 53b116be1bbadd416449d9a0104f514139f495c8 (diff) |
Make sure we send a ValueChanged event if the spinbox value has changed
Unfortunately the codepath for keyPressEvent does not call updateState,
so we have to add the same line in two places.
Note that updateState() is only called from mousePressEvent() and
mouseMoveEvent().
Task-number: 254053
Diffstat (limited to 'tests/auto/qaccessibility')
-rw-r--r-- | tests/auto/qaccessibility/tst_qaccessibility.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/qaccessibility/tst_qaccessibility.cpp b/tests/auto/qaccessibility/tst_qaccessibility.cpp index 8a88b599da..b8aec505d2 100644 --- a/tests/auto/qaccessibility/tst_qaccessibility.cpp +++ b/tests/auto/qaccessibility/tst_qaccessibility.cpp @@ -2623,6 +2623,13 @@ void tst_QAccessibility::spinBoxTest() QVERIFY(childRect.isNull() == false); } + spinBox->setFocus(); + QTestAccessibility::clearEvents(); + QTest::keyPress(spinBox, Qt::Key_Up); + QTest::qWait(200); + EventList events = QTestAccessibility::events(); + QTestAccessibilityEvent expectedEvent(spinBox, 0, (int)QAccessible::ValueChanged); + QVERIFY(events.contains(expectedEvent)); delete spinBox; QTestAccessibility::clearEvents(); #else |