Skip to content

Commit

Permalink
Fix test compilation
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Cambra <[email protected]>
  • Loading branch information
claucambra committed Nov 28, 2022
1 parent 8b3e713 commit 2a1f16b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
4 changes: 3 additions & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

Expand Down
7 changes: 5 additions & 2 deletions test/nextcloud_add_test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -52,6 +53,7 @@ macro(nextcloud_add_test test_class)
cmdCore
Qt::Test
Qt::Quick
Qt::Core5Compat
)

if (WIN32)
Expand Down Expand Up @@ -103,6 +105,7 @@ macro(nextcloud_add_benchmark test_class)
Qt::Test
Qt::Xml
Qt::Network
Qt::Core5Compat
)

IF(BUILD_UPDATER)
Expand Down
2 changes: 1 addition & 1 deletion test/testactivitydata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions test/testchunkingng.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
*/

#include <QtTest>
#include <QTextCodec>

#include "syncenginetestutils.h"
#include <syncengine.h>

Expand Down
2 changes: 2 additions & 0 deletions test/testsyncengine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
*/

#include <QtTest>
#include <QTextCodec>

#include "syncenginetestutils.h"
#include <syncengine.h>
#include <propagatorjobs.h>
Expand Down

0 comments on commit 2a1f16b

Please sign in to comment.