┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/tests/dolphindetailsviewtest.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/dolphindetailsviewtest.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/dolphindetailsviewtest.cpp')
-rw-r--r--src/tests/dolphindetailsviewtest.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/tests/dolphindetailsviewtest.cpp b/src/tests/dolphindetailsviewtest.cpp
index 87a9d253d..d17341f6f 100644
--- a/src/tests/dolphindetailsviewtest.cpp
+++ b/src/tests/dolphindetailsviewtest.cpp
@@ -98,11 +98,6 @@ void DolphinDetailsViewTest::testExpandedUrls()
QSet<KUrl> expectedExpandedUrls;
QCOMPARE(detailsView->expandedUrls(), expectedExpandedUrls);
- // Every time we expand a folder, we have to wait until the view has finished loading
- // its contents before we can expand further subfolders. We keep track of the reloading
- // using a signal spy.
- QSignalSpy spyFinishedPathLoading(&view, SIGNAL(finishedPathLoading(const KUrl&)));
-
// Expand URLs one by one and verify the result of DolphinDetailsView::expandedUrls()
QStringList itemsToExpand;
itemsToExpand << "b" << "b/a" << "b/a/c" << "b/c" << "c";
@@ -115,10 +110,7 @@ void DolphinDetailsViewTest::testExpandedUrls()
// Before we proceed, we have to make sure that the view has finished
// loading the contents of the expanded folder.
- while (spyFinishedPathLoading.isEmpty()) {
- QTest::qWait(10);
- }
- spyFinishedPathLoading.takeFirst();
+ QVERIFY(waitForFinishedPathLoading(&view));
}
// Collapse URLs one by one and verify the result of DolphinDetailsView::expandedUrls()