┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tests/placesitemmodeltest.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/tests/placesitemmodeltest.cpp b/src/tests/placesitemmodeltest.cpp
index 2e814220a..e0fdb1d86 100644
--- a/src/tests/placesitemmodeltest.cpp
+++ b/src/tests/placesitemmodeltest.cpp
@@ -85,6 +85,7 @@ private:
PlacesItemModel* m_model;
QSet<int> m_tobeRemoved;
QMap<QString, QDBusInterface *> m_interfacesMap;
+ int m_expectedModelCount = 15;
void setBalooEnabled(bool enabled);
int indexOf(const QUrl &url);
@@ -227,7 +228,7 @@ void PlacesItemModelTest::init()
m_model = new PlacesItemModel();
// WORKAROUND: need to wait for bookmark to load, check: PlacesItemModel::updateBookmarks
QTest::qWait(300);
- QCOMPARE(m_model->count(), 17);
+ QCOMPARE(m_model->count(), m_expectedModelCount);
}
void PlacesItemModelTest::cleanup()
@@ -261,6 +262,14 @@ void PlacesItemModelTest::initTestCase()
QVERIFY(QFile::remove(bookmarsFileName));
}
+ if (QDir(QStandardPaths::writableLocation(QStandardPaths::DesktopLocation)).exists()) {
+ m_expectedModelCount++;
+ }
+
+ if (QDir(QStandardPaths::writableLocation(QStandardPaths::DownloadLocation)).exists()) {
+ m_expectedModelCount++;
+ }
+
qRegisterMetaType<KItemRangeList>();
qRegisterMetaType<KItemRange>();
}