summaryrefslogtreecommitdiffstats
path: root/tests/auto/qaccessibility
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qaccessibility')
-rw-r--r--tests/auto/qaccessibility/tst_qaccessibility.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/tests/auto/qaccessibility/tst_qaccessibility.cpp b/tests/auto/qaccessibility/tst_qaccessibility.cpp
index 7de0512..b13f6dd 100644
--- a/tests/auto/qaccessibility/tst_qaccessibility.cpp
+++ b/tests/auto/qaccessibility/tst_qaccessibility.cpp
@@ -1888,10 +1888,9 @@ void tst_QAccessibility::buttonTest()
// Standard push button
CounterButton pushButton("Ok", &window);
- // toggle push button
- QPushButton togglepush("Toggle", &window);
- togglepush.setToggleButton(true);
-
+ // toggle button
+ QPushButton toggleButton("Toggle", &window);
+ toggleButton.setCheckable(true);
// standard checkbox
QCheckBox checkBox("Check me!", &window);
@@ -1910,7 +1909,7 @@ void tst_QAccessibility::buttonTest()
// standard toolbutton
QToolButton toggletool(&window);
- toggletool.setToggleButton(TRUE);
+ toggletool.setCheckable(true);
toggletool.setText("Toggle");
toggletool.setMinimumSize(20,20);
@@ -1957,17 +1956,17 @@ void tst_QAccessibility::buttonTest()
delete interface;
// test toggle button
- interface = QAccessible::queryAccessibleInterface(&togglepush);
+ interface = QAccessible::queryAccessibleInterface(&toggleButton);
actionInterface = interface->actionInterface();
QCOMPARE(interface->role(0), QAccessible::CheckBox);
QCOMPARE(actionInterface->description(0), QString("Toggles the button."));
QCOMPARE(actionInterface->name(0), QString("Check"));
- QVERIFY(!togglepush.isChecked());
+ QVERIFY(!toggleButton.isChecked());
QVERIFY((interface->state(0) & QAccessible::Checked) == 0);
actionInterface->doAction(0);
QTest::qWait(500);
QCOMPARE(actionInterface->name(0), QString("Uncheck"));
- QVERIFY(togglepush.isChecked());
+ QVERIFY(toggleButton.isChecked());
QVERIFY((interface->state(0) & QAccessible::Checked));
delete interface;