summaryrefslogtreecommitdiffstats
path: root/mobile-widgets
diff options
context:
space:
mode:
authorGravatar Jan Mulder <jlmulder@xs4all.nl>2018-09-11 15:38:38 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-09-11 15:38:20 -0700
commitbb0ac5f7784acec930b5131bfb25f0c4b5fa2f3b (patch)
treec2bd8760b17ec3bfd192bd02d03d32a39c5d7618 /mobile-widgets
parentcc72a606bb9a64a0d251e06c19cf8b8dd7b131ed (diff)
downloadsubsurface-bb0ac5f7784acec930b5131bfb25f0c4b5fa2f3b.tar.gz
cleanup[4/6], mobile: remove superfluous code from gpslocation
Despite the fast that this code is sitting in core, its used mainly from mobile. In 987e221f8e6b7b, the buttons to interact with the GPS webservice were deleted from the UI. Now, delete all the code that was used under these buttons. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Diffstat (limited to 'mobile-widgets')
-rw-r--r--mobile-widgets/qmlmanager.cpp33
-rw-r--r--mobile-widgets/qmlmanager.h3
2 files changed, 1 insertions, 35 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp
index f5e7cff11..a7ef0e420 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -490,8 +490,6 @@ void QMLManager::saveCloudCredentials()
} else if (cloudCredentialsChanged) {
// let's make sure there are no unsaved changes
saveChangesLocal();
- free((void *)prefs.userid);
- prefs.userid = NULL;
syncLoadFromCloud();
QString url;
getCloudURL(url);
@@ -622,25 +620,7 @@ void QMLManager::retrieveUserid()
revertToNoCloudIfNeeded();
return;
}
- QMLPrefs::instance()->setCredentialStatus(qPref::CS_VERIFIED);
- QString userid(prefs.userid);
- if (userid.isEmpty()) {
- if (empty_string(prefs.cloud_storage_email) || empty_string(prefs.cloud_storage_password)) {
- appendTextToLog("cloud user name or password are empty, can't retrieve web user id");
- revertToNoCloudIfNeeded();
- return;
- }
- appendTextToLog(QStringLiteral("calling getUserid with user %1").arg(prefs.cloud_storage_email));
- userid = locationProvider->getUserid(prefs.cloud_storage_email, prefs.cloud_storage_password);
- }
- if (!userid.isEmpty()) {
- // overwrite the existing userid
- free((void *)prefs.userid);
- prefs.userid = copy_qstring(userid);
- QSettings s;
- s.setValue("subsurface_webservice_uid", prefs.userid);
- s.sync();
- }
+
QMLPrefs::instance()->setCredentialStatus(qPref::CS_VERIFIED);
setStartPageText(tr("Cloud credentials valid, loading dives..."));
// this only gets called with "alreadySaving" already locked
@@ -1390,17 +1370,6 @@ void QMLManager::applyGpsData()
refreshDiveList();
}
-void QMLManager::sendGpsData()
-{
- locationProvider->uploadToServer();
-}
-
-void QMLManager::downloadGpsData()
-{
- locationProvider->downloadFromServer();
- populateGpsData();
-}
-
void QMLManager::populateGpsData()
{
if (GpsListModel::instance())
diff --git a/mobile-widgets/qmlmanager.h b/mobile-widgets/qmlmanager.h
index 48e6540b5..4b96621ba 100644
--- a/mobile-widgets/qmlmanager.h
+++ b/mobile-widgets/qmlmanager.h
@@ -168,8 +168,6 @@ public slots:
QString addDive();
void addDiveAborted(int id);
void applyGpsData();
- void sendGpsData();
- void downloadGpsData();
void populateGpsData();
void cancelDownloadDC();
void clearGpsData();
@@ -200,7 +198,6 @@ private:
SuitCompletionModel suitModel;
DiveMasterCompletionModel divemasterModel;
LocationInformationModel locationModel;
- QString m_ssrfGpsWebUserid;
QString m_startPageText;
QString m_logText;
QString m_lastError;