From f45966d9c3f7ac513d87eef024fb328029e89ba5 Mon Sep 17 00:00:00 2001 From: Frank Reininghaus Date: Mon, 29 Nov 2010 21:24:53 +0000 Subject: 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 --- src/tests/testbase.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/tests/testbase.cpp') 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 -- cgit v1.3