diff --git a/test/nextcloud_add_test.cmake b/test/nextcloud_add_test.cmake index 6bbcdf30f6059..cfceb0141db72 100644 --- a/test/nextcloud_add_test.cmake +++ b/test/nextcloud_add_test.cmake @@ -1,4 +1,6 @@ find_package(Qt5 COMPONENTS Core Test Xml Network Qml Quick REQUIRED) +get_property(nextcloudCoreName TARGET nextcloudCore PROPERTY NAME) +set(nextcloudCoreAutogenInclude ${CMAKE_BINARY_DIR}/src/gui/${nextcloudCoreName}_autogen/include) macro(nextcloud_build_test test_class) set(CMAKE_AUTOMOC TRUE) @@ -32,6 +34,7 @@ macro(nextcloud_build_test test_class) target_include_directories(${OWNCLOUD_TEST_CLASS}Test PRIVATE "${CMAKE_SOURCE_DIR}/test/" + ${nextcloudCoreAutogenInclude} ${CMAKE_SOURCE_DIR}/src/3rdparty/qtokenizer ) set_target_properties(${OWNCLOUD_TEST_CLASS}Test PROPERTIES FOLDER Tests) @@ -81,8 +84,9 @@ macro(nextcloud_add_test test_class) target_include_directories(${OWNCLOUD_TEST_CLASS}Test PRIVATE "${CMAKE_SOURCE_DIR}/test/" + ${nextcloudCoreAutogenInclude} ${CMAKE_SOURCE_DIR}/src/3rdparty/qtokenizer - ) + ) set_target_properties(${OWNCLOUD_TEST_CLASS}Test PROPERTIES FOLDER Tests) endmacro() diff --git a/test/testaccountsettings.cpp b/test/testaccountsettings.cpp index 3cd370b95b808..47d668d1194c8 100644 --- a/test/testaccountsettings.cpp +++ b/test/testaccountsettings.cpp @@ -6,7 +6,8 @@ */ #include -#include "gui/nextcloudCore_autogen/include/ui_accountsettings.h" + +#include "ui_accountsettings.h" #include "accountsettings.h" using namespace OCC; diff --git a/test/testflow2authwidget.cpp b/test/testflow2authwidget.cpp index 027a6565363d6..eae61547ff5a4 100644 --- a/test/testflow2authwidget.cpp +++ b/test/testflow2authwidget.cpp @@ -6,8 +6,7 @@ */ #include -#include "gui/nextcloudCore_autogen/include/ui_flow2authwidget.h" -#include "gui/wizard/flow2authwidget.h" +#include "wizard/flow2authwidget.h" using namespace OCC; diff --git a/test/testfolderman.cpp b/test/testfolderman.cpp index dfa6873261175..e6a600eae9c7b 100644 --- a/test/testfolderman.cpp +++ b/test/testfolderman.cpp @@ -5,16 +5,15 @@ * */ -#include +#include #include #include -#include "QtTest/qtestcase.h" #include "common/utility.h" #include "folderman.h" #include "account.h" #include "accountstate.h" -#include +#include "accountmanager.h" #include "configfile.h" #include "syncenginetestutils.h" #include "testhelper.h" diff --git a/test/testfolderstatusmodel.cpp b/test/testfolderstatusmodel.cpp index 36cc90699bad4..6c7e9c479e8ca 100644 --- a/test/testfolderstatusmodel.cpp +++ b/test/testfolderstatusmodel.cpp @@ -5,12 +5,13 @@ * */ +#include + #include "localdiscoverytracker.h" #include "folderstatusmodel.h" #include "syncrunfilelog.h" #include "syncengine.h" #include "account.h" -#include #define private public #include "accountstate.h" diff --git a/test/testfolderwizard.cpp b/test/testfolderwizard.cpp index cade22e878942..20c245bf0adee 100644 --- a/test/testfolderwizard.cpp +++ b/test/testfolderwizard.cpp @@ -5,16 +5,15 @@ * */ -#include "gui/nextcloudCore_autogen/include/ui_folderwizardsourcepage.h" -#include "gui/nextcloudCore_autogen/include/ui_folderwizardtargetpage.h" +#include +#include + #include "creds/abstractcredentials.h" #include "folderwizard.h" #include "accountstate.h" #include "testhelper.h" -#include #include "folderman.h" #include "account.h" -#include using namespace OCC; diff --git a/test/testgeneralsettings.cpp b/test/testgeneralsettings.cpp index 5af07187c372b..56f8de10aa05d 100644 --- a/test/testgeneralsettings.cpp +++ b/test/testgeneralsettings.cpp @@ -6,13 +6,14 @@ */ #include + #include "theme.h" #include "folderman.h" #include "configfile.h" #define private public #include "generalsettings.h" #undef private -#include "gui/nextcloudCore_autogen/include/ui_generalsettings.h" +#include "ui_generalsettings.h" using namespace OCC; diff --git a/test/testheaderbutton.cpp b/test/testheaderbutton.cpp index 825ba74de4098..487f7724de5f1 100644 --- a/test/testheaderbutton.cpp +++ b/test/testheaderbutton.cpp @@ -5,10 +5,11 @@ * */ -#include +#include #include #include #include + #include "theme.h" using namespace OCC; diff --git a/test/testowncloudadvancedsetuppage.cpp b/test/testowncloudadvancedsetuppage.cpp index 669dbb5910ef8..e072d51189442 100644 --- a/test/testowncloudadvancedsetuppage.cpp +++ b/test/testowncloudadvancedsetuppage.cpp @@ -6,9 +6,9 @@ */ #include -#include "gui/nextcloudCore_autogen/include/ui_owncloudadvancedsetuppage.h" -#include "gui/wizard/owncloudadvancedsetuppage.h" -#include "gui/wizard/owncloudwizard.h" + +#include "wizard/owncloudadvancedsetuppage.h" +#include "wizard/owncloudwizard.h" using namespace OCC; diff --git a/test/testowncloudsetuppage.cpp b/test/testowncloudsetuppage.cpp index e46c59981c6c5..5b08b8741ab3c 100644 --- a/test/testowncloudsetuppage.cpp +++ b/test/testowncloudsetuppage.cpp @@ -6,8 +6,8 @@ */ #include -#include "gui/nextcloudCore_autogen/include/ui_owncloudsetupnocredspage.h" -#include "gui/wizard/owncloudsetuppage.h" + +#include "wizard/owncloudsetuppage.h" using namespace OCC; diff --git a/test/testowncloudwizard.cpp b/test/testowncloudwizard.cpp index e718b0f25ae96..9f0d556e5823f 100644 --- a/test/testowncloudwizard.cpp +++ b/test/testowncloudwizard.cpp @@ -6,7 +6,8 @@ */ #include -#include "gui/wizard/owncloudwizard.h" + +#include "wizard/owncloudwizard.h" using namespace OCC; diff --git a/test/testsettingsdialog.cpp b/test/testsettingsdialog.cpp index 8f674d87ad91c..0314e86955e5c 100644 --- a/test/testsettingsdialog.cpp +++ b/test/testsettingsdialog.cpp @@ -7,7 +7,8 @@ #include #include -#include "gui/nextcloudCore_autogen/include/ui_settingsdialog.h" + +#include "ui_settingsdialog.h" #include "settingsdialog.h" using namespace OCC; diff --git a/test/testusermodel.cpp b/test/testusermodel.cpp index d81a541737c55..653b64a628588 100644 --- a/test/testusermodel.cpp +++ b/test/testusermodel.cpp @@ -14,7 +14,7 @@ #define private public #include "accountstate.h" #include "folder.h" -#include "gui/tray/UserModel.h" +#include "tray/usermodel.h" #undef private using namespace OCC; diff --git a/test/testwindow.cpp b/test/testwindow.cpp index 2da7f25e60348..8373454c1207c 100644 --- a/test/testwindow.cpp +++ b/test/testwindow.cpp @@ -11,7 +11,7 @@ #include #include -#include "tray/UserModel.h" +#include "tray/usermodel.h" #include "systray.h" #include "theme.h"