From 27e6214401970b809e0e594cccaa3b3bddad151a Mon Sep 17 00:00:00 2001 From: Dominik Holland Date: Tue, 27 Jul 2010 13:47:10 +0200 Subject: Fixed QButtonGroup autotest to run on Maemo --- tests/auto/qbuttongroup/tst_qbuttongroup.cpp | 9 +++++---- 1 file 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*"); 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(&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); -- cgit v0.12