mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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 987e221f8e
, 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>
This commit is contained in:
parent
cc72a606bb
commit
bb0ac5f778
4 changed files with 1 additions and 252 deletions
|
@ -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())
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue