summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-03-31 14:55:11 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-31 08:49:12 -0700
commit6dbc9ca4b01a1e776f90a2f6337d19418ca0c365 (patch)
tree3c6c269035ba9ebe6034e059d4dc5eca50f149b2
parent286100c10af67df2747d136cee5d4cca192b4b5a (diff)
downloadsubsurface-6dbc9ca4b01a1e776f90a2f6337d19418ca0c365.tar.gz
cleanup: don't compile subsurface-helper.cpp for tests
It is unclear why the subsurface-helper.cpp file was linked with the tests. In any case, it led to comlicated ifdef-ery, so let's remove that for now and readd later if the need arises. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
-rw-r--r--subsurface-helper.cpp5
-rw-r--r--tests/CMakeLists.txt3
2 files changed, 1 insertions, 7 deletions
diff --git a/subsurface-helper.cpp b/subsurface-helper.cpp
index a23e63d6e..da73c05a7 100644
--- a/subsurface-helper.cpp
+++ b/subsurface-helper.cpp
@@ -33,7 +33,6 @@ QString getAndroidHWInfo(); // from android.cpp
#include <QFontDatabase>
#endif /* Q_OS_ANDROID */
-#ifndef SUBSURFACE_TEST_DATA
QObject *qqWindowObject = NULL;
// Forward declaration
@@ -181,7 +180,6 @@ static void register_meta_types()
{
qRegisterMetaType<duration_t>();
}
-#endif // not SUBSURFACE_TEST_DATA
template <typename T>
static void register_qml_type(const char *name)
@@ -195,8 +193,6 @@ static void register_qml_types(QQmlEngine *engine)
// register qPref*
qPref::registerQML(engine);
-#ifndef SUBSURFACE_TEST_DATA
-
#ifdef SUBSURFACE_MOBILE
register_qml_type<QMLManager>("QMLManager");
register_qml_type<QMLProfile>("QMLProfile");
@@ -206,5 +202,4 @@ static void register_qml_types(QQmlEngine *engine)
register_qml_type<MapWidgetHelper>("MapWidgetHelper");
register_qml_type<MapLocationModel>("MapLocationModel");
-#endif // not SUBSURFACE_TEST_DATA
}
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index c2e10dc63..77312a215 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -88,8 +88,7 @@ add_definitions(-g)
add_definitions(-DSUBSURFACE_TEST_DATA="${SUBSURFACE_TEST_DATA}")
# Build QML test runner
-# add_executable demands relative path, therefore ../
-add_executable(TestQML testqml.cpp ../subsurface-helper.cpp )
+add_executable(TestQML testqml.cpp)
target_link_libraries(
TestQML
subsurface_corelib