diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 2ff0dfe3ba428..3dc86a7e82ca3 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -4,6 +4,8 @@ include(nextcloud_add_test.cmake) set(CMAKE_AUTOMOC TRUE) +find_package(Qt${QT_VERSION_MAJOR}Core5Compat ${REQUIRED_QT_VERSION} CONFIG QUIET) + add_library(testutils STATIC syncenginetestutils.cpp @@ -14,7 +16,7 @@ add_library(testutils endtoendtestutils.cpp ) -target_link_libraries(testutils PUBLIC Nextcloud::sync Qt::Test) +target_link_libraries(testutils PUBLIC Nextcloud::sync Qt::Test Qt::Core5Compat) target_include_directories(testutils PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) set_target_properties(testutils PROPERTIES FOLDER Tests) diff --git a/test/nextcloud_add_test.cmake b/test/nextcloud_add_test.cmake index 93f8334a48e96..c08fe240432e6 100644 --- a/test/nextcloud_add_test.cmake +++ b/test/nextcloud_add_test.cmake @@ -13,8 +13,9 @@ macro(nextcloud_build_test test_class) testutils nextcloudCore cmdCore - Qt5::Test - Qt5::Quick + Qt::Test + Qt::Quick + Qt::Core5Compat ) if (WIN32) @@ -52,6 +53,7 @@ macro(nextcloud_add_test test_class) cmdCore Qt::Test Qt::Quick + Qt::Core5Compat ) if (WIN32) @@ -103,6 +105,7 @@ macro(nextcloud_add_benchmark test_class) Qt::Test Qt::Xml Qt::Network + Qt::Core5Compat ) IF(BUILD_UPDATER) diff --git a/test/testactivitydata.cpp b/test/testactivitydata.cpp index 28def53293a1b..c9ce335ba133b 100644 --- a/test/testactivitydata.cpp +++ b/test/testactivitydata.cpp @@ -38,7 +38,7 @@ class TestActivityData : public QObject const auto path = QStringLiteral("path/test.").append(fileFormat); const auto fileName = QStringLiteral("test.").append(fileFormat); const auto activityType = QStringLiteral("file"); - const auto activityId = 90000; + const auto activityId = QStringLiteral("90000"); const auto message = QStringLiteral(); const auto objectName = QStringLiteral("test.").append(fileFormat); const auto link = account->url().toString().append(QStringLiteral("/f/")).append(activityId); diff --git a/test/testchunkingng.cpp b/test/testchunkingng.cpp index 0c5175bf0da69..97ae9ff001998 100644 --- a/test/testchunkingng.cpp +++ b/test/testchunkingng.cpp @@ -6,6 +6,8 @@ */ #include +#include + #include "syncenginetestutils.h" #include diff --git a/test/testsyncengine.cpp b/test/testsyncengine.cpp index 8a9100a09ba8c..717cdb8089e56 100644 --- a/test/testsyncengine.cpp +++ b/test/testsyncengine.cpp @@ -6,6 +6,8 @@ */ #include +#include + #include "syncenginetestutils.h" #include #include