From 1a032453950a058eba3cb0695a7331737330add3 Mon Sep 17 00:00:00 2001 From: Frank Reininghaus Date: Tue, 9 Nov 2010 08:33:45 +0000 Subject: 1. Add method TestBase::reloadViewAndWait(). 2. Remove some debug output from DolphinDetailsViewTest - it seems that the test failure I saw on cdash.org is due to a failing kioslave, which is probably not Dolphin's fault. svn path=/trunk/KDE/kdebase/apps/; revision=1194514 --- src/tests/testbase.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/tests/testbase.cpp') diff --git a/src/tests/testbase.cpp b/src/tests/testbase.cpp index 5945cd258..0fd48cbd2 100644 --- a/src/tests/testbase.cpp +++ b/src/tests/testbase.cpp @@ -19,6 +19,8 @@ #include "testbase.h" +#include + #include "views/dolphinview.h" #include "views/dolphinmodel.h" #include "views/dolphindirlister.h" @@ -29,6 +31,8 @@ #include #include +#include + TestBase::TestBase() { m_tempDir = new KTempDir; @@ -60,6 +64,16 @@ QAbstractItemView* TestBase::itemView () const return m_view->m_viewAccessor.itemView(); } +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"; +} KUrl TestBase::testDirUrl() const { -- cgit v1.3