summaryrefslogtreecommitdiffstats
path: root/tests/auto/qaccessibility
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@nokia.com>2011-04-04 09:50:31 (GMT)
committerFrederik Gladhorn <frederik.gladhorn@nokia.com>2011-04-04 10:08:51 (GMT)
commitd8941c0c0e3e3019a2048ae470e4e46111a2cfcf (patch)
treef5d6a38f9e131c1344b3713690c6d8ad1725603f /tests/auto/qaccessibility
parentb240f8a2ee3b7ff82a389fbf5dfd076792f385e8 (diff)
downloadQt-d8941c0c0e3e3019a2048ae470e4e46111a2cfcf.zip
Qt-d8941c0c0e3e3019a2048ae470e4e46111a2cfcf.tar.gz
Qt-d8941c0c0e3e3019a2048ae470e4e46111a2cfcf.tar.bz2
Remove Qt3ism: setToggleButton - setCheckable
Reviewed-by: Jan-Arve
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;