diff options
author | Frederik Gladhorn <frederik.gladhorn@nokia.com> | 2011-04-04 11:50:31 +0200 |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2011-05-10 12:54:44 +0200 |
commit | 6d401a9eb03fea16494327e43d71d97c63b09faf (patch) | |
tree | 7017436d3f2b5b1c9d031f0b5f8f2adc90dc012c /tests/auto/qaccessibility | |
parent | 2c7c8cf5d0a5d44b2dd84181c1f1a1e84fd5e0ac (diff) |
Remove Qt3ism: setToggleButton - setCheckable
Reviewed-by: Jan-Arve
(cherry picked from commit d8941c0c0e3e3019a2048ae470e4e46111a2cfcf)
Diffstat (limited to 'tests/auto/qaccessibility')
-rw-r--r-- | tests/auto/qaccessibility/tst_qaccessibility.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/tests/auto/qaccessibility/tst_qaccessibility.cpp b/tests/auto/qaccessibility/tst_qaccessibility.cpp index 7de0512d7e..b13f6dd632 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; |