From 21e8b1e363fcb46798aec49b623cfd2b29c286a3 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Tue, 5 Apr 2016 14:22:00 -0300 Subject: [PATCH] Fix compilation with the new folder architecture A few more fixes for things that broke in commit 7be962bfc287 ("Move subsurface-core to core and qt-mobile to mobile-widgets"). [Dirk Hohndel: slightly edited and overlap with Linus' patch removed] Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- .../plugins/facebook/facebookconnectwidget.cpp | 6 ++++-- tests/CMakeLists.txt | 8 ++++++-- tests/testdivesiteduplication.cpp | 4 ++-- tests/testgitstorage.cpp | 12 +++++++----- tests/testgpscoords.cpp | 2 +- tests/testparse.cpp | 6 +++--- tests/testplan.cpp | 10 +++++----- tests/testprofile.cpp | 2 +- tests/testrenumber.cpp | 6 +++--- tests/testunitconversion.cpp | 2 +- 10 files changed, 33 insertions(+), 25 deletions(-) diff --git a/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp b/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp index 264244b48..ba54ae3bf 100644 --- a/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp +++ b/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp @@ -21,8 +21,10 @@ #include "mainwindow.h" #include "profile-widget/profilewidget2.h" -#include "pref.h" -#include "helpers.h" + +#include "core/pref.h" +#include "core/helpers.h" + #include "ui_socialnetworksdialog.h" #include "ui_facebookconnectwidget.h" diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index a31e2c6f8..d516bb686 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,7 +1,11 @@ # QTest based tests +qt5_add_resources(SUBSURFACE_TEST_RESOURCES ../subsurface.qrc) + +add_library(RESOURCE_LIBRARY STATIC ${SUBSURFACE_TEST_RESOURCES}) + macro(TEST NAME FILE) - add_executable(${NAME} ${FILE} ${SUBSURFACE_RESOURCES} ) - target_link_libraries(${NAME} subsurface_corelib ${QT_TEST_LIBRARIES} ${SUBSURFACE_LINK_LIBRARIES} ) + add_executable(${NAME} ${FILE} ) + target_link_libraries(${NAME} subsurface_corelib RESOURCE_LIBRARY ${QT_TEST_LIBRARIES} ${SUBSURFACE_LINK_LIBRARIES} ) add_test(NAME ${NAME} COMMAND $) endmacro() diff --git a/tests/testdivesiteduplication.cpp b/tests/testdivesiteduplication.cpp index fc8ba0a1e..805dac470 100644 --- a/tests/testdivesiteduplication.cpp +++ b/tests/testdivesiteduplication.cpp @@ -1,6 +1,6 @@ #include "testdivesiteduplication.h" -#include "dive.h" -#include "divesite.h" +#include "core/dive.h" +#include "core/divesite.h" void TestDiveSiteDuplication::testReadV2() { diff --git a/tests/testgitstorage.cpp b/tests/testgitstorage.cpp index 30417b3c4..f4955970f 100644 --- a/tests/testgitstorage.cpp +++ b/tests/testgitstorage.cpp @@ -1,10 +1,12 @@ #include "testgitstorage.h" -#include "dive.h" -#include "divelist.h" -#include "file.h" #include "git2.h" -#include "prefs-macros.h" -#include "subsurfacestartup.h" + +#include "core/dive.h" +#include "core/divelist.h" +#include "core/file.h" +#include "core/prefs-macros.h" +#include "core/subsurfacestartup.h" + #include #include #include diff --git a/tests/testgpscoords.cpp b/tests/testgpscoords.cpp index 50bb4bcdb..535745de7 100644 --- a/tests/testgpscoords.cpp +++ b/tests/testgpscoords.cpp @@ -1,4 +1,4 @@ -#include +#include "core/dive.h" #include "testgpscoords.h" //unit under test diff --git a/tests/testparse.cpp b/tests/testparse.cpp index 8bb092b56..8d4cedb43 100644 --- a/tests/testparse.cpp +++ b/tests/testparse.cpp @@ -1,7 +1,7 @@ #include "testparse.h" -#include "dive.h" -#include "file.h" -#include "divelist.h" +#include "core/dive.h" +#include "core/file.h" +#include "core/divelist.h" #include char *intdup(int index) diff --git a/tests/testplan.cpp b/tests/testplan.cpp index 50966af0c..d6bca5e14 100644 --- a/tests/testplan.cpp +++ b/tests/testplan.cpp @@ -1,9 +1,9 @@ -#include "dive.h" +#include "core/dive.h" #include "testplan.h" -#include "planner.h" -#include "units.h" -#include "subsurfacestartup.h" -#include "qthelper.h" +#include "core/planner.h" +#include "core/units.h" +#include "core/subsurfacestartup.h" +#include "core/qthelper.h" #include #define DEBUG 1 diff --git a/tests/testprofile.cpp b/tests/testprofile.cpp index d8aea3cae..cf2db80f3 100644 --- a/tests/testprofile.cpp +++ b/tests/testprofile.cpp @@ -1,5 +1,5 @@ #include "testprofile.h" -#include "dive.h" +#include "core/dive.h" void TestProfile::testRedCeiling() { diff --git a/tests/testrenumber.cpp b/tests/testrenumber.cpp index 83c4b56f0..459987a05 100644 --- a/tests/testrenumber.cpp +++ b/tests/testrenumber.cpp @@ -1,7 +1,7 @@ #include "testrenumber.h" -#include "dive.h" -#include "file.h" -#include "divelist.h" +#include "core/dive.h" +#include "core/file.h" +#include "core/divelist.h" #include void TestRenumber::setup() diff --git a/tests/testunitconversion.cpp b/tests/testunitconversion.cpp index 8e64fdd85..4583bcaf0 100644 --- a/tests/testunitconversion.cpp +++ b/tests/testunitconversion.cpp @@ -1,5 +1,5 @@ #include "testunitconversion.h" -#include "dive.h" +#include "core/dive.h" void TestUnitConversion::testUnitConversions() {