summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/gpslocation.cpp5
-rw-r--r--core/gpslocation.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/core/gpslocation.cpp b/core/gpslocation.cpp
index 1c5d378cf..30b101419 100644
--- a/core/gpslocation.cpp
+++ b/core/gpslocation.cpp
@@ -46,6 +46,11 @@ GpsLocation *GpsLocation::instance()
return m_Instance;
}
+bool GpsLocation::hasInstance()
+{
+ return m_Instance != NULL;
+}
+
GpsLocation::~GpsLocation()
{
m_Instance = NULL;
diff --git a/core/gpslocation.h b/core/gpslocation.h
index 34e0708ff..9922997f1 100644
--- a/core/gpslocation.h
+++ b/core/gpslocation.h
@@ -27,6 +27,7 @@ public:
GpsLocation(void (*showMsgCB)(const char *msg), QObject *parent);
~GpsLocation();
static GpsLocation *instance();
+ static bool hasInstance();
bool applyLocations();
int getGpsNum() const;
QString getUserid(QString user, QString passwd);