┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/tests/testbase.cpp
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.cpp
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.cpp')
-rw-r--r--src/tests/testbase.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/tests/testbase.cpp b/src/tests/testbase.cpp
index 59c40fb94..38909e671 100644
--- a/src/tests/testbase.cpp
+++ b/src/tests/testbase.cpp
@@ -33,10 +33,15 @@ QAbstractItemView* TestBase::itemView(const DolphinView* view)
return view->m_viewAccessor.itemView();
}
+bool TestBase::waitForFinishedPathLoading(DolphinView* view, int milliseconds)
+{
+ return QTest::kWaitForSignal(view, SIGNAL(finishedPathLoading(const KUrl&)), milliseconds);
+}
+
void TestBase::reloadViewAndWait(DolphinView* view)
{
view->reload();
- QVERIFY(QTest::kWaitForSignal(view, SIGNAL(finishedPathLoading(const KUrl&)), 2000));
+ QVERIFY(waitForFinishedPathLoading(view));
}
QStringList TestBase::viewItems(const DolphinView* view)