┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/tests/testbase.h
diff options
context:
space:
mode:
authorFrank Reininghaus <[email protected]>2011-04-05 22:12:51 +0200
committerFrank Reininghaus <[email protected]>2011-04-05 22:12:51 +0200
commitc58d84c26106e48a368982d88c3cac47eec0ca54 (patch)
treed93993aad45a40a4fc86f5a276315347164e87a5 /src/tests/testbase.h
parent7148704d726fb0c3fd9ceeefab8d7901f69fe9b9 (diff)
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.
Diffstat (limited to 'src/tests/testbase.h')
-rw-r--r--src/tests/testbase.h6
1 files changed, 6 insertions, 0 deletions
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);