diff options
| author | Elvis Angelaccio <[email protected]> | 2018-10-13 18:49:35 +0200 |
|---|---|---|
| committer | Elvis Angelaccio <[email protected]> | 2018-10-13 22:06:32 +0200 |
| commit | 277700425e7d77345de74ff0c6dc58fb0aca193c (patch) | |
| tree | 0bde10fdce17ea4924d525e349b0b7b8d0189e6d /src/tests/placesitemmodeltest.cpp | |
| parent | c527dc217234e6a2dba4d9ee08945c17b9a215bd (diff) | |
[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.
Diffstat (limited to 'src/tests/placesitemmodeltest.cpp')
| -rw-r--r-- | src/tests/placesitemmodeltest.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
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() |
