mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
mobile: turn GpsLocation into a regular singleton construct
Simply move the initialization of the logging function into its own method and call that in the QMLManager constructor. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
257698aff4
commit
cb9a337965
3 changed files with 13 additions and 20 deletions
|
|
@ -29,14 +29,14 @@ struct DiveAndLocation {
|
|||
class GpsLocation : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
GpsLocation(void (*showMsgCB)(const char *msg), QObject *parent);
|
||||
GpsLocation();
|
||||
~GpsLocation();
|
||||
static GpsLocation *instance();
|
||||
static bool hasInstance();
|
||||
std::vector<DiveAndLocation> getLocations();
|
||||
int getGpsNum() const;
|
||||
bool hasLocationsSource();
|
||||
QString currentPosition();
|
||||
void setLogCallBack(void (*showMsgCB)(const char *msg));
|
||||
|
||||
QMap<qint64, gpsTracker> currentGPSInfo() const;
|
||||
|
||||
|
|
@ -49,7 +49,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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue