From 0c374af176f961c45fadb716af55789984d257b6 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 1 Sep 2019 00:24:18 +0200 Subject: Map: don't derive MapLocation from QObject Map location is 1) A plain value type 2) Never passed to QML Make it a simple C++ class. Signed-off-by: Berthold Stoeger --- qt-models/maplocationmodel.h | 4 +--- subsurface-helper.cpp | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/qt-models/maplocationmodel.h b/qt-models/maplocationmodel.h index afb7e92ec..cb8252a3a 100644 --- a/qt-models/maplocationmodel.h +++ b/qt-models/maplocationmodel.h @@ -10,10 +10,8 @@ #include #include -class MapLocation : public QObject +class MapLocation { - Q_OBJECT - public: explicit MapLocation(); explicit MapLocation(struct dive_site *ds, QGeoCoordinate coord, QString name, bool selected); diff --git a/subsurface-helper.cpp b/subsurface-helper.cpp index 4d7774953..5671ffc58 100644 --- a/subsurface-helper.cpp +++ b/subsurface-helper.cpp @@ -164,6 +164,5 @@ void register_qml_types(QQmlEngine *engine) REGISTER_TYPE(MapWidgetHelper, "MapWidgetHelper"); REGISTER_TYPE(MapLocationModel, "MapLocationModel"); - REGISTER_TYPE(MapLocation, "MapLocation"); #endif // not SUBSURFACE_TEST_DATA } -- cgit v1.2.3-70-g09d2