From 277700425e7d77345de74ff0c6dc58fb0aca193c Mon Sep 17 00:00:00 2001 From: Elvis Angelaccio Date: Sat, 13 Oct 2018 18:49:35 +0200 Subject: [PlacesItemModelTest] Revert last two commits Commit c527dc2172 proves that on the CI sometimes the `QAbstractItemModel::dataChanged` signal is not being emitted at all (build #208 failed because the test timed out). KFilePlacesModel emits `dataChanged()` in the `_k_reloadBookmarks()` slot only when it's called after the KBookmarkManager emits the `changed()` signal. And the `changed()` signal is emitted after KDirWatch emits the `created` signal. On the CI server kdirwatch is probably not reliable, which would explain why the test randomly fails. --- src/tests/placesitemmodeltest.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/tests') diff --git a/src/tests/placesitemmodeltest.cpp b/src/tests/placesitemmodeltest.cpp index 73204954b..40ee47cbc 100644 --- a/src/tests/placesitemmodeltest.cpp +++ b/src/tests/placesitemmodeltest.cpp @@ -735,13 +735,10 @@ void PlacesItemModelTest::testRefresh() QVERIFY(item->text() != sameItem->text()); // propagate change - QEventLoop eventLoop; - connect(m_model, &PlacesItemModel::sourceModelDataChanged, &eventLoop, &QEventLoop::quit); m_model->refresh(); - eventLoop.exec(); // item must be equal - QCOMPARE(item->text(), sameItem->text()); + QTRY_COMPARE(item->text(), sameItem->text()); } void PlacesItemModelTest::testIcons_data() -- cgit v1.3