]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Use kWaitForSignal to wait until the view has finished reloading. I've
authorFrank Reininghaus <frank78ac@googlemail.com>
Mon, 29 Nov 2010 21:24:53 +0000 (21:24 +0000)
committerFrank Reininghaus <frank78ac@googlemail.com>
Mon, 29 Nov 2010 21:24:53 +0000 (21:24 +0000)
also added a timeout such that the tests fail rather than hang if the
file kioslave dies (which happens sometimes according to some test
logs on cdash.org).

svn path=/trunk/KDE/kdebase/apps/; revision=1202159

src/tests/testbase.cpp

index 0fd48cbd2f93d877ca65e221e870e3043da74b57..2161c9314c4ca6b7a18d3850e31e538da121371a 100644 (file)
@@ -66,13 +66,8 @@ QAbstractItemView* TestBase::itemView () const
 
 void TestBase::reloadViewAndWait()
 {
-    kDebug() << "Reloading view and waiting for the finishedPathLoading(const KUrl&) signal...";
-    QSignalSpy finished(m_view, SIGNAL(finishedPathLoading(const KUrl&)));
     m_view->reload();
-    while (finished.count() != 1) {
-        QTest::qWait(50);
-    }
-    kDebug() << "...signal received, continuing";
+    QVERIFY(QTest::kWaitForSignal(m_view, SIGNAL(finishedPathLoading(const KUrl&)), 5000));
 }
 
 KUrl TestBase::testDirUrl() const