summaryrefslogtreecommitdiffstats
path: root/tests/auto/qbuttongroup
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-09-08 08:45:57 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-09-08 08:49:39 (GMT)
commitfa889cf4b80868249c70715275069eb150b597cc (patch)
treeab98dc0979d7c2874902e7f2a9812843104e1c49 /tests/auto/qbuttongroup
parentdeff8fcf0ed060b949c3ec0fa0ec4bd81c253825 (diff)
downloadQt-fa889cf4b80868249c70715275069eb150b597cc.zip
Qt-fa889cf4b80868249c70715275069eb150b597cc.tar.gz
Qt-fa889cf4b80868249c70715275069eb150b597cc.tar.bz2
Try to make test more robust.
By using QTRY_{COMPARE,VERIFY} instead of waiting an arbitrary amount of time waiting for the window manager to do his job. Also use QApplication::setActiveWindow which seems to be more robust then QWidget::activateWindow
Diffstat (limited to 'tests/auto/qbuttongroup')
-rw-r--r--tests/auto/qbuttongroup/tst_qbuttongroup.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/qbuttongroup/tst_qbuttongroup.cpp b/tests/auto/qbuttongroup/tst_qbuttongroup.cpp
index f49568d..82969b9 100644
--- a/tests/auto/qbuttongroup/tst_qbuttongroup.cpp
+++ b/tests/auto/qbuttongroup/tst_qbuttongroup.cpp
@@ -100,7 +100,7 @@ private slots:
#if QT_VERSION >= 0x040600
void autoIncrementId();
#endif
-
+
void task209485_removeFromGroupInEventHandler_data();
void task209485_removeFromGroupInEventHandler();
};
@@ -333,12 +333,12 @@ void tst_QButtonGroup::testSignals()
QCOMPARE(clickedSpy.count(), 1);
QCOMPARE(clickedIdSpy.count(), 1);
-
- int expectedId = -1;
+
+ int expectedId = -1;
#if QT_VERSION >= 0x040600
expectedId = -2;
#endif
-
+
QVERIFY(clickedIdSpy.takeFirst().at(0).toInt() == expectedId);
QCOMPARE(pressedSpy.count(), 1);
QCOMPARE(pressedIdSpy.count(), 1);