diff -r b72c6db6890b -r 5dc02b23752f tests/auto/qtimer/tst_qtimer.cpp --- a/tests/auto/qtimer/tst_qtimer.cpp Wed Jun 23 19:07:03 2010 +0300 +++ b/tests/auto/qtimer/tst_qtimer.cpp Tue Jul 06 15:10:48 2010 +0300 @@ -85,6 +85,7 @@ void timerFiresOnlyOncePerProcessEvents(); void timerIdPersistsAfterThreadExit(); void cancelLongTimer(); + void singleShotStaticFunctionZeroTimeout(); }; class TimerHelper : public QObject @@ -611,5 +612,16 @@ QVERIFY(!timer.isActive()); } +void tst_QTimer::singleShotStaticFunctionZeroTimeout() +{ + TimerHelper helper; + + QTimer::singleShot(0, &helper, SLOT(timeout())); + QTest::qWait(500); + QCOMPARE(helper.count, 1); + QTest::qWait(500); + QCOMPARE(helper.count, 1); +} + QTEST_MAIN(tst_QTimer) #include "tst_qtimer.moc"