From: Frank Reininghaus Date: Mon, 29 Nov 2010 21:24:53 +0000 (+0000) Subject: Use kWaitForSignal to wait until the view has finished reloading. I've X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/f45966d9c3f7ac513d87eef024fb328029e89ba5?ds=inline Use kWaitForSignal to wait until the view has finished reloading. I've 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 --- diff --git a/src/tests/testbase.cpp b/src/tests/testbase.cpp index 0fd48cbd2..2161c9314 100644 --- a/src/tests/testbase.cpp +++ b/src/tests/testbase.cpp @@ -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