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);
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()
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>();
}