diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2021-01-22 17:09:18 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-01-23 13:19:11 -0800 |
commit | 64dea827bdeddf6b6c2e59295bd7bd69c9a147e4 (patch) | |
tree | e1e868e3c570f5d54d265dcbcfca24aef1e81823 /core | |
parent | faafcd0cfc2301fd77ba2deb68619fec099ad6fd (diff) | |
download | subsurface-64dea827bdeddf6b6c2e59295bd7bd69c9a147e4.tar.gz |
mobile/debugging: copy GPS fixes to clipboard
The goal is to enable a user experiencing crashes when applying GPS data
to their dive log to make all necessary data available to the
developers. Hopefully the clipboard is large enough to hold all the
data.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core')
-rw-r--r-- | core/gpslocation.cpp | 10 | ||||
-rw-r--r-- | core/gpslocation.h | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/core/gpslocation.cpp b/core/gpslocation.cpp index 012b24403..72f0bb557 100644 --- a/core/gpslocation.cpp +++ b/core/gpslocation.cpp @@ -321,6 +321,16 @@ void GpsLocation::loadFromStorage() } } +QString GpsLocation::getFixString() +{ + // only used for debugging + QString res; + struct gpsTracker gpsEntry; + foreach (gpsEntry, m_trackers.values()) + res += QString("%1: %2; %3 ; \"%4\"\n").arg(gpsEntry.when).arg(gpsEntry.location.lat.udeg).arg(gpsEntry.location.lon.udeg).arg(gpsEntry.name); + return res; +} + void GpsLocation::replaceFixToStorage(gpsTracker >) { if (!m_trackers.keys().contains(gt.when)) { diff --git a/core/gpslocation.h b/core/gpslocation.h index ea3373d3b..eb61fe7ef 100644 --- a/core/gpslocation.h +++ b/core/gpslocation.h @@ -37,7 +37,7 @@ public: bool hasLocationsSource(); QString currentPosition(); void setLogCallBack(void (*showMsgCB)(const char *msg)); - + QString getFixString(); QMap<qint64, gpsTracker> currentGPSInfo() const; private: |