From c58d84c26106e48a368982d88c3cac47eec0ca54 Mon Sep 17 00:00:00 2001 From: Frank Reininghaus Date: Tue, 5 Apr 2011 22:12:51 +0200 Subject: Add function TestBase::waitForFinishedPathLoading() Many tests have to wait until this signal is received from the DolphinView, so it is convenient to have a function that wraps the QTest::kWaitForSignal() call. --- src/tests/testbase.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/tests/testbase.h') diff --git a/src/tests/testbase.h b/src/tests/testbase.h index 7034cbe41..5b5d7164e 100644 --- a/src/tests/testbase.h +++ b/src/tests/testbase.h @@ -47,6 +47,12 @@ public: /** Returns the item view (icons, details, or columns) */ static QAbstractItemView* itemView(const DolphinView* view); + /** + * Waits until the view emits its finishedPathLoading(const KUrl&) signal. + * Returns false if it is not received within the given number of milliseconds. + */ + static bool waitForFinishedPathLoading(DolphinView* view, int milliseconds=2000); + /** Reloads the view and waits for the finishedPathLoading(const KUrl&) signal. */ static void reloadViewAndWait(DolphinView* view); -- cgit v1.3