┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/CMakeLists.txt4
-rw-r--r--src/tests/kfileitemmodelbenchmark.cpp2
-rw-r--r--src/tests/kfileitemmodeltest.cpp1
-rw-r--r--src/tests/kitemlistcontrollertest.cpp6
-rw-r--r--src/tests/kitemsettest.cpp4
5 files changed, 8 insertions, 9 deletions
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
index 8e0c6f119..6431ff3fa 100644
--- a/src/tests/CMakeLists.txt
+++ b/src/tests/CMakeLists.txt
@@ -43,14 +43,14 @@ target_link_libraries(kfileitemmodelbenchmark dolphinprivate Qt${QT_MAJOR_VERSIO
ecm_add_test(kitemlistkeyboardsearchmanagertest.cpp LINK_LIBRARIES dolphinprivate Qt${QT_MAJOR_VERSION}::Test)
# DolphinSearchBox
-if (KF5Baloo_FOUND)
+if (KF6Baloo_FOUND)
ecm_add_test(dolphinsearchboxtest.cpp
TEST_NAME dolphinsearchboxtest
LINK_LIBRARIES dolphinprivate dolphinstatic Qt${QT_MAJOR_VERSION}::Test)
endif()
# DolphinQuery
-if (KF5Baloo_FOUND)
+if (KF6Baloo_FOUND)
ecm_add_test(dolphinquerytest.cpp
TEST_NAME dolphinquerytest
LINK_LIBRARIES dolphinprivate dolphinstatic Qt${QT_MAJOR_VERSION}::Test)
diff --git a/src/tests/kfileitemmodelbenchmark.cpp b/src/tests/kfileitemmodelbenchmark.cpp
index 0daf4abd0..4eeb9ff55 100644
--- a/src/tests/kfileitemmodelbenchmark.cpp
+++ b/src/tests/kfileitemmodelbenchmark.cpp
@@ -74,7 +74,7 @@ void KFileItemModelBenchmark::insertAndRemoveManyItems_data()
QList<int> sizes;
sizes << 100000;
- for (int n : qAsConst(sizes)) {
+ for (int n : std::as_const(sizes)) {
QStringList allStrings;
for (int i = 0; i < n; ++i) {
allStrings << QString::number(i);
diff --git a/src/tests/kfileitemmodeltest.cpp b/src/tests/kfileitemmodeltest.cpp
index 753960a08..16189a0fc 100644
--- a/src/tests/kfileitemmodeltest.cpp
+++ b/src/tests/kfileitemmodeltest.cpp
@@ -14,7 +14,6 @@
#include <KDirLister>
#include <kio/job.h>
-#include <kio_version.h>
#include "kitemviews/kfileitemmodel.h"
#include "testdir.h"
diff --git a/src/tests/kitemlistcontrollertest.cpp b/src/tests/kitemlistcontrollertest.cpp
index d1a9cfc7c..ac2110c0f 100644
--- a/src/tests/kitemlistcontrollertest.cpp
+++ b/src/tests/kitemlistcontrollertest.cpp
@@ -292,9 +292,9 @@ void KItemListControllerTest::testKeyboardNavigation_data()
break;
}
- for (int columnCount : qAsConst(columnCountList)) {
- for (const KItemListController::SelectionBehavior &selectionBehavior : qAsConst(selectionBehaviorList)) {
- for (bool groupingEnabled : qAsConst(groupingEnabledList)) {
+ for (int columnCount : std::as_const(columnCountList)) {
+ for (const KItemListController::SelectionBehavior &selectionBehavior : std::as_const(selectionBehaviorList)) {
+ for (bool groupingEnabled : std::as_const(groupingEnabledList)) {
QList<QPair<KeyPress, ViewState>> testList;
// First, key presses which should have the same effect
diff --git a/src/tests/kitemsettest.cpp b/src/tests/kitemsettest.cpp
index e0c536c67..0005daceb 100644
--- a/src/tests/kitemsettest.cpp
+++ b/src/tests/kitemsettest.cpp
@@ -66,11 +66,11 @@ static QSet<int> KItemSet2QSet(const KItemSet &itemSet)
// Check that the conversion was successful.
Q_ASSERT(itemSet.count() == result.count());
- for (int i : qAsConst(itemSet)) {
+ for (int i : std::as_const(itemSet)) {
Q_ASSERT(result.contains(i));
}
- for (int i : qAsConst(result)) {
+ for (int i : std::as_const(result)) {
Q_ASSERT(itemSet.contains(i));
}