mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Cleanup: remove GpsLocation::instance() function
The last user was removed in 8576edd8d6
.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
4d3686edec
commit
400b218f76
2 changed files with 0 additions and 19 deletions
|
@ -15,16 +15,12 @@
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
GpsLocation *GpsLocation::m_Instance = NULL;
|
|
||||||
|
|
||||||
GpsLocation::GpsLocation(void (*showMsgCB)(const char *), QObject *parent) :
|
GpsLocation::GpsLocation(void (*showMsgCB)(const char *), QObject *parent) :
|
||||||
QObject(parent),
|
QObject(parent),
|
||||||
m_GpsSource(0),
|
m_GpsSource(0),
|
||||||
waitingForPosition(false),
|
waitingForPosition(false),
|
||||||
haveSource(UNKNOWN)
|
haveSource(UNKNOWN)
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(m_Instance == NULL, "GpsLocation", "GpsLocation recreated");
|
|
||||||
m_Instance = this;
|
|
||||||
showMessageCB = showMsgCB;
|
showMessageCB = showMsgCB;
|
||||||
// create a QSettings object that's separate from the main application settings
|
// create a QSettings object that's separate from the main application settings
|
||||||
geoSettings = new QSettings(QSettings::NativeFormat, QSettings::UserScope,
|
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)));
|
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)
|
void GpsLocation::setGpsTimeThreshold(int seconds)
|
||||||
{
|
{
|
||||||
if (m_GpsSource) {
|
if (m_GpsSource) {
|
||||||
|
|
|
@ -24,8 +24,6 @@ class GpsLocation : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
GpsLocation(void (*showMsgCB)(const char *msg), QObject *parent);
|
GpsLocation(void (*showMsgCB)(const char *msg), QObject *parent);
|
||||||
~GpsLocation();
|
|
||||||
static GpsLocation *instance();
|
|
||||||
bool applyLocations();
|
bool applyLocations();
|
||||||
int getGpsNum() const;
|
int getGpsNum() const;
|
||||||
bool hasLocationsSource();
|
bool hasLocationsSource();
|
||||||
|
@ -42,7 +40,6 @@ private:
|
||||||
QNetworkReply *reply;
|
QNetworkReply *reply;
|
||||||
QString userAgent;
|
QString userAgent;
|
||||||
void (*showMessageCB)(const char *msg);
|
void (*showMessageCB)(const char *msg);
|
||||||
static GpsLocation *m_Instance;
|
|
||||||
bool waitingForPosition;
|
bool waitingForPosition;
|
||||||
QMap<qint64, gpsTracker> m_trackers;
|
QMap<qint64, gpsTracker> m_trackers;
|
||||||
QList<gpsTracker> m_deletedTrackers;
|
QList<gpsTracker> m_deletedTrackers;
|
||||||
|
|
Loading…
Add table
Reference in a new issue