diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-09-22 15:05:14 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-09-25 13:35:30 -0700 |
commit | 400b218f769320221567b7b66f39c33126a7d2e1 (patch) | |
tree | eaeaed24b664fe54a3004b43f8550cda80b85805 | |
parent | 4d3686edec2a7bca03223df8800b14928a076fc9 (diff) | |
download | subsurface-400b218f769320221567b7b66f39c33126a7d2e1.tar.gz |
Cleanup: remove GpsLocation::instance() function
The last user was removed in 8576edd8d611f06fcbd452d88bbc3d46c39d1b9f.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
-rw-r--r-- | core/gpslocation.cpp | 16 | ||||
-rw-r--r-- | core/gpslocation.h | 3 |
2 files changed, 0 insertions, 19 deletions
diff --git a/core/gpslocation.cpp b/core/gpslocation.cpp index faed55ad7..e18e46321 100644 --- a/core/gpslocation.cpp +++ b/core/gpslocation.cpp @@ -15,16 +15,12 @@ #include <QApplication> #include <QTimer> -GpsLocation *GpsLocation::m_Instance = NULL; - GpsLocation::GpsLocation(void (*showMsgCB)(const char *), QObject *parent) : QObject(parent), m_GpsSource(0), waitingForPosition(false), haveSource(UNKNOWN) { - Q_ASSERT_X(m_Instance == NULL, "GpsLocation", "GpsLocation recreated"); - m_Instance = this; showMessageCB = showMsgCB; // create a QSettings object that's separate from the main application settings geoSettings = new QSettings(QSettings::NativeFormat, QSettings::UserScope, @@ -37,18 +33,6 @@ GpsLocation::GpsLocation(void (*showMsgCB)(const char *), QObject *parent) : connect(qPrefLocationService::instance(), SIGNAL(time_thresholdChanged(int)), this, SLOT(setGpsTimeThreshold(int))); } -GpsLocation *GpsLocation::instance() -{ - Q_ASSERT(m_Instance != NULL); - - return m_Instance; -} - -GpsLocation::~GpsLocation() -{ - m_Instance = NULL; -} - void GpsLocation::setGpsTimeThreshold(int seconds) { if (m_GpsSource) { diff --git a/core/gpslocation.h b/core/gpslocation.h index f328c5616..60e16e186 100644 --- a/core/gpslocation.h +++ b/core/gpslocation.h @@ -24,8 +24,6 @@ class GpsLocation : public QObject { Q_OBJECT public: GpsLocation(void (*showMsgCB)(const char *msg), QObject *parent); - ~GpsLocation(); - static GpsLocation *instance(); bool applyLocations(); int getGpsNum() const; bool hasLocationsSource(); @@ -42,7 +40,6 @@ private: QNetworkReply *reply; QString userAgent; void (*showMessageCB)(const char *msg); - static GpsLocation *m_Instance; bool waitingForPosition; QMap<qint64, gpsTracker> m_trackers; QList<gpsTracker> m_deletedTrackers; |