diff options
author | Tomaz Canabrava <tomaz.canabrava@gmail.com> | 2016-03-06 21:11:06 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-03-07 11:13:11 -0800 |
commit | 3a003cb4fa6a295726ab71f95c400111abef7d44 (patch) | |
tree | 9322df1c8f6c9bffc1fd345d5ee5517901ab039a /subsurface-core | |
parent | f25dce8511e96e2bda65bd545f74887606152b5e (diff) | |
download | subsurface-3a003cb4fa6a295726ab71f95c400111abef7d44.tar.gz |
Silence warnings for the GpsLocation
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface-core')
-rw-r--r-- | subsurface-core/gpslocation.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/subsurface-core/gpslocation.cpp b/subsurface-core/gpslocation.cpp index 00c297864..3907560a6 100644 --- a/subsurface-core/gpslocation.cpp +++ b/subsurface-core/gpslocation.cpp @@ -21,7 +21,7 @@ GpsLocation *GpsLocation::m_Instance = NULL; -GpsLocation::GpsLocation(void (*showMsgCB)(const char *), QObject *parent) +GpsLocation::GpsLocation(void (*showMsgCB)(const char *), QObject *parent) : QObject(parent) { Q_ASSERT_X(m_Instance == NULL, "GpsLocation", "GpsLocation recreated"); m_Instance = this; @@ -374,15 +374,13 @@ void GpsLocation::addFixToStorage(gpsTracker >) void GpsLocation::deleteFixFromStorage(gpsTracker >) { - bool found = false; - int i; qint64 when = gt.when; int cnt = m_trackers.count(); if (cnt == 0 || !m_trackers.keys().contains(when)) { qDebug() << "no gps fix with timestamp" << when; return; } - if (geoSettings->value(QString("gpsFix%1_time").arg(gt.idx)).toULongLong() != when) { + if (geoSettings->value(QString("gpsFix%1_time").arg(gt.idx)).toLongLong() != when) { qDebug() << "uh oh - index for tracker has gotten out of sync..."; return; } @@ -430,11 +428,13 @@ void GpsLocation::clearGpsData() void GpsLocation::postError(QNetworkReply::NetworkError error) { + Q_UNUSED(error); status(QString("error when sending a GPS fix: %1").arg(reply->errorString())); } void GpsLocation::getUseridError(QNetworkReply::NetworkError error) { + Q_UNUSED(error); status(QString("error when retrieving Subsurface webservice user id: %1").arg(reply->errorString())); } @@ -447,10 +447,8 @@ void GpsLocation::deleteFixesFromServer() QNetworkAccessManager *manager = new QNetworkAccessManager(qApp); QUrl url(GPS_FIX_DELETE_URL); QList<qint64> keys = m_trackers.keys(); - qint64 key; while (!m_deletedTrackers.isEmpty()) { gpsTracker gt = m_deletedTrackers.takeFirst(); - int idx = gt.idx; QDateTime dt; QUrlQuery data; dt.setTime_t(gt.when - gettimezoneoffset(gt.when)); @@ -499,7 +497,6 @@ void GpsLocation::uploadToServer() qint64 key; Q_FOREACH(key, keys) { struct gpsTracker gt = m_trackers.value(key); - int idx = gt.idx; QDateTime dt; QUrlQuery data; dt.setTime_t(gt.when - gettimezoneoffset(gt.when)); |