diff options
| author | Frank Reininghaus <[email protected]> | 2010-11-09 08:33:45 +0000 |
|---|---|---|
| committer | Frank Reininghaus <[email protected]> | 2010-11-09 08:33:45 +0000 |
| commit | 1a032453950a058eba3cb0695a7331737330add3 (patch) | |
| tree | 707763d32e5f3e73aaae7d9a2adcf142f93f2e5b /src/tests/testbase.cpp | |
| parent | da44e5e0b2237fa1019caeecf854aa95a4b360d8 (diff) | |
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
Diffstat (limited to 'src/tests/testbase.cpp')
| -rw-r--r-- | src/tests/testbase.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
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 <qtest_kde.h> + #include "views/dolphinview.h" #include "views/dolphinmodel.h" #include "views/dolphindirlister.h" @@ -29,6 +31,8 @@ #include <QtCore/QDir> #include <QtGui/QAbstractItemView> +#include <kdebug.h> + 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 { |
