mirror of
https://invent.kde.org/system/dolphin
synced 2024-07-04 17:30:55 +00:00
kfileitemmodeltest: Include KIO/SimpleJob header instead of relying on compat code
Amends 3f92ac800c
This commit is contained in:
parent
3f92ac800c
commit
acbc78f8ba
|
@ -13,7 +13,7 @@
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
#include <KDirLister>
|
#include <KDirLister>
|
||||||
#include <kio/job.h>
|
#include <KIO/SimpleJob>
|
||||||
|
|
||||||
#include "kitemviews/kfileitemmodel.h"
|
#include "kitemviews/kfileitemmodel.h"
|
||||||
#include "testdir.h"
|
#include "testdir.h"
|
||||||
|
@ -1756,10 +1756,10 @@ void KFileItemModelTest::collapseParentOfHiddenItems()
|
||||||
// Set a name filter that matches nothing -> nothing should remain.
|
// Set a name filter that matches nothing -> nothing should remain.
|
||||||
m_model->setNameFilter("xyz");
|
m_model->setNameFilter("xyz");
|
||||||
QCOMPARE(itemsRemovedSpy.count(), 1);
|
QCOMPARE(itemsRemovedSpy.count(), 1);
|
||||||
QCOMPARE(m_model->count(), 0); //Everything is hidden
|
QCOMPARE(m_model->count(), 0); // Everything is hidden
|
||||||
QCOMPARE(itemsInModel(), QStringList());
|
QCOMPARE(itemsInModel(), QStringList());
|
||||||
|
|
||||||
//Filter by the file names. Folder "d" will be hidden since it was collapsed
|
// Filter by the file names. Folder "d" will be hidden since it was collapsed
|
||||||
m_model->setNameFilter("1");
|
m_model->setNameFilter("1");
|
||||||
QCOMPARE(itemsRemovedSpy.count(), 1); // nothing was removed, itemsRemovedSpy count will remain the same:
|
QCOMPARE(itemsRemovedSpy.count(), 1); // nothing was removed, itemsRemovedSpy count will remain the same:
|
||||||
QCOMPARE(m_model->count(), 6); // 6 items: "a/", "a/b/", "a/b/c", "a/b/c/1", "a/b/1", "a/1"
|
QCOMPARE(m_model->count(), 6); // 6 items: "a/", "a/b/", "a/b/c", "a/b/c/1", "a/b/1", "a/1"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user