mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +00:00
[KFileItemModelTest] Port to fastInsert()
We already depend on KF5 > 5.47, so we are ready to switch to the non-deprecated fastInsert() method.
This commit is contained in:
parent
b303e3c93a
commit
d47090eb13
|
@ -1553,22 +1553,22 @@ void KFileItemModelTest::testChangeSortRoleWhileFiltering()
|
|||
|
||||
KIO::UDSEntry entry[3];
|
||||
|
||||
entry[0].insert(KIO::UDSEntry::UDS_NAME, "a.txt");
|
||||
entry[0].insert(KIO::UDSEntry::UDS_USER, "user-b");
|
||||
entry[0].fastInsert(KIO::UDSEntry::UDS_NAME, "a.txt");
|
||||
entry[0].fastInsert(KIO::UDSEntry::UDS_USER, "user-b");
|
||||
|
||||
entry[1].insert(KIO::UDSEntry::UDS_NAME, "b.txt");
|
||||
entry[1].insert(KIO::UDSEntry::UDS_USER, "user-c");
|
||||
entry[1].fastInsert(KIO::UDSEntry::UDS_NAME, "b.txt");
|
||||
entry[1].fastInsert(KIO::UDSEntry::UDS_USER, "user-c");
|
||||
|
||||
entry[2].insert(KIO::UDSEntry::UDS_NAME, "c.txt");
|
||||
entry[2].insert(KIO::UDSEntry::UDS_USER, "user-a");
|
||||
entry[2].fastInsert(KIO::UDSEntry::UDS_NAME, "c.txt");
|
||||
entry[2].fastInsert(KIO::UDSEntry::UDS_USER, "user-a");
|
||||
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
entry[i].insert(KIO::UDSEntry::UDS_FILE_TYPE, 0100000); // S_IFREG might not be defined on non-Unix platforms.
|
||||
entry[i].insert(KIO::UDSEntry::UDS_ACCESS, 07777);
|
||||
entry[i].insert(KIO::UDSEntry::UDS_SIZE, 0);
|
||||
entry[i].insert(KIO::UDSEntry::UDS_MODIFICATION_TIME, 0);
|
||||
entry[i].insert(KIO::UDSEntry::UDS_GROUP, "group");
|
||||
entry[i].insert(KIO::UDSEntry::UDS_ACCESS_TIME, 0);
|
||||
entry[i].fastInsert(KIO::UDSEntry::UDS_FILE_TYPE, 0100000); // S_IFREG might not be defined on non-Unix platforms.
|
||||
entry[i].fastInsert(KIO::UDSEntry::UDS_ACCESS, 07777);
|
||||
entry[i].fastInsert(KIO::UDSEntry::UDS_SIZE, 0);
|
||||
entry[i].fastInsert(KIO::UDSEntry::UDS_MODIFICATION_TIME, 0);
|
||||
entry[i].fastInsert(KIO::UDSEntry::UDS_GROUP, "group");
|
||||
entry[i].fastInsert(KIO::UDSEntry::UDS_ACCESS_TIME, 0);
|
||||
items.append(KFileItem(entry[i], m_testDir->url(), false, true));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue