diff options
author | Dominik Holland <dominik.holland@nokia.com> | 2010-07-27 11:47:10 (GMT) |
---|---|---|
committer | Harald Fernengel <harald.fernengel@nokia.com> | 2010-11-02 14:29:26 (GMT) |
commit | 27e6214401970b809e0e594cccaa3b3bddad151a (patch) | |
tree | e6d2e70663ec0e92bb050305415a1509877b11cc /tests | |
parent | 1409261805af661c0f19d109027d44ec04ddbfc4 (diff) | |
download | Qt-27e6214401970b809e0e594cccaa3b3bddad151a.zip Qt-27e6214401970b809e0e594cccaa3b3bddad151a.tar.gz Qt-27e6214401970b809e0e594cccaa3b3bddad151a.tar.bz2 |
Fixed QButtonGroup autotest to run on Maemo
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qbuttongroup/tst_qbuttongroup.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/auto/qbuttongroup/tst_qbuttongroup.cpp b/tests/auto/qbuttongroup/tst_qbuttongroup.cpp index a610a7f..1831e5d 100644 --- a/tests/auto/qbuttongroup/tst_qbuttongroup.cpp +++ b/tests/auto/qbuttongroup/tst_qbuttongroup.cpp @@ -396,19 +396,20 @@ void tst_QButtonGroup::task106609() vbox->addWidget(radio2); buttons->addButton(radio3, 3); vbox->addWidget(radio3); - - radio1->setFocus(); - radio1->setChecked(true); dlg.show(); + QTest::qWaitForWindowShown(&dlg); qRegisterMetaType<QAbstractButton*>("QAbstractButton*"); QSignalSpy spy1(buttons, SIGNAL(buttonClicked(QAbstractButton*))); QSignalSpy spy2(buttons, SIGNAL(buttonClicked(int))); - QTestEventLoop::instance().enterLoop(1); QApplication::setActiveWindow(&dlg); QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget*>(&dlg)); + radio1->setFocus(); + radio1->setChecked(true); + QTestEventLoop::instance().enterLoop(1); + //qDebug() << "int:" << spy2.count() << "QAbstractButton*:" << spy1.count(); QCOMPARE(spy2.count(), 2); QCOMPARE(spy1.count(), 2); |