From 9ae7040a91c3e3e0606d7abe085ef6da47efd6d2 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 27 Sep 2019 16:26:54 -0700 Subject: Revert the singleton PR It turns out that this isn't working the way it was intended to. Signed-off-by: Dirk Hohndel --- core/gpslocation.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'core/gpslocation.h') diff --git a/core/gpslocation.h b/core/gpslocation.h index 60e16e186..02377bfca 100644 --- a/core/gpslocation.h +++ b/core/gpslocation.h @@ -24,6 +24,9 @@ class GpsLocation : public QObject { Q_OBJECT public: GpsLocation(void (*showMsgCB)(const char *msg), QObject *parent); + ~GpsLocation(); + static GpsLocation *instance(); + static bool hasInstance(); bool applyLocations(); int getGpsNum() const; bool hasLocationsSource(); @@ -40,6 +43,7 @@ private: QNetworkReply *reply; QString userAgent; void (*showMessageCB)(const char *msg); + static GpsLocation *m_Instance; bool waitingForPosition; QMap m_trackers; QList m_deletedTrackers; -- cgit v1.2.3-70-g09d2