]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix building kfileitemmodeltest with KF6
authorAhmad Samir <a.samirh78@gmail.com>
Thu, 5 May 2022 20:15:14 +0000 (22:15 +0200)
committerAhmad Samir <a.samirh78@gmail.com>
Tue, 31 May 2022 14:25:13 +0000 (14:25 +0000)
- Fix kio_version.h include
- Explicitly create a QSet for QCOMPARE

src/tests/kfileitemmodeltest.cpp

index e9bb7efb78ca8a5760ea1d1f84cbf2b1ebb2d15e..f2560d9fc482b373faf681c2eecb0b3819d80bc8 100644 (file)
@@ -14,7 +14,7 @@
 
 #include <KDirLister>
 #include <kio/job.h>
-#include <KIO/kio_version.h>
+#include <kio_version.h>
 
 
 #include "kitemviews/kfileitemmodel.h"
@@ -2076,7 +2076,7 @@ void KFileItemModelTest::testInsertAfterExpand()
     QVERIFY(m_model->isExpanded(0));
     QVERIFY(itemsInsertedSpy.wait());
     QCOMPARE(m_model->count(), 2); // 3 items: "a/", "a/a/"
-    QCOMPARE(m_model->expandedDirectories(), {QUrl::fromLocalFile(m_testDir->path() + "/a")});
+    QCOMPARE(m_model->expandedDirectories(), QSet<QUrl>({QUrl::fromLocalFile(m_testDir->path() + "/a")}));
 
     QCOMPARE(itemsInsertedSpy.count(), 1);
     {