summaryrefslogtreecommitdiffstats
path: root/map-widget/qmlmapwidgethelper.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-10-28 22:04:56 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-10-29 00:09:31 +0000
commitc980216dc0e15a21b245a902870f9b8c5a18275c (patch)
treef30fa3d5267e4b6d8306fb0f2d1bb85b6b2b402d /map-widget/qmlmapwidgethelper.h
parent920eb7576ff3c5fab19c12b7b291042817422ac5 (diff)
downloadsubsurface-c980216dc0e15a21b245a902870f9b8c5a18275c.tar.gz
Dive list: take pointer-to-dive_site instead of QVariant
Since "struct dive_site *" is now a Q_METATYPE, the functions MapWidgetHelper::centerOnDiveSite() and ::getCoordinates() can directly get such a pointer instead of a QVariant. This makes the code nicer to read. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'map-widget/qmlmapwidgethelper.h')
-rw-r--r--map-widget/qmlmapwidgethelper.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/map-widget/qmlmapwidgethelper.h b/map-widget/qmlmapwidgethelper.h
index 9300bf3bc..43f722aba 100644
--- a/map-widget/qmlmapwidgethelper.h
+++ b/map-widget/qmlmapwidgethelper.h
@@ -5,7 +5,6 @@
#include "core/units.h"
#include <QObject>
#include <QGeoCoordinate>
-#include <QVariant>
#if defined(Q_OS_IOS)
#include <QtPlugin>
@@ -27,10 +26,9 @@ class MapWidgetHelper : public QObject {
public:
explicit MapWidgetHelper(QObject *parent = NULL);
- void centerOnDiveSite(struct dive_site *);
void centerOnSelectedDiveSite();
- Q_INVOKABLE QGeoCoordinate getCoordinates(QVariant dive_site);
- Q_INVOKABLE void centerOnDiveSite(QVariant dive_site);
+ Q_INVOKABLE QGeoCoordinate getCoordinates(struct dive_site *ds);
+ Q_INVOKABLE void centerOnDiveSite(struct dive_site *ds);
Q_INVOKABLE void reloadMapLocations();
Q_INVOKABLE void copyToClipboardCoordinates(QGeoCoordinate coord, bool formatTraditional);
Q_INVOKABLE void calculateSmallCircleRadius(QGeoCoordinate coord);