diff options
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/subsurfacewebservices.cpp | 25 | ||||
-rw-r--r-- | qt-ui/subsurfacewebservices.h | 2 |
2 files changed, 4 insertions, 23 deletions
diff --git a/qt-ui/subsurfacewebservices.cpp b/qt-ui/subsurfacewebservices.cpp index 50f195635..87cd6006e 100644 --- a/qt-ui/subsurfacewebservices.cpp +++ b/qt-ui/subsurfacewebservices.cpp @@ -313,16 +313,16 @@ void WebServices::resetState() SubsurfaceWebServices::SubsurfaceWebServices(QWidget *parent, Qt::WindowFlags f) : WebServices(parent, f) { QSettings s; - if (!save_userid_local || !*userid) + if (!prefs.save_userid_local || !*prefs.userid) ui.userID->setText(s.value("subsurface_webservice_uid").toString().toUpper()); else - ui.userID->setText(userid); + ui.userID->setText(prefs.userid); hidePassword(); hideUpload(); ui.progressBar->setFormat("Enter User ID and click Download"); ui.progressBar->setRange(0, 1); ui.progressBar->setValue(-1); - ui.saveUidLocal->setChecked(save_userid_local); + ui.saveUidLocal->setChecked(prefs.save_userid_local); } void SubsurfaceWebServices::buttonClicked(QAbstractButton *button) @@ -349,7 +349,7 @@ void SubsurfaceWebServices::buttonClicked(QAbstractButton *button) set_save_userid_local(qSaveUid); if (qSaveUid) { QString qSettingUid = s.value("subsurface_webservice_uid").toString(); - QString qFileUid = QString::fromStdString(userid); + QString qFileUid = QString(prefs.userid); bool s_eq_d = (qSettingUid == qDialogUid); bool d_eq_f = (qDialogUid == qFileUid); if (!d_eq_f || s_eq_d) @@ -904,20 +904,3 @@ void DivelogsDeWebServices::buttonClicked(QAbstractButton *button) break; } } - -#define MAX_USERID_SIZE 32 -short save_userid_local = false; -char *userid = NULL; -void set_save_userid_local(short value) -{ - QSettings s; - s.setValue("save_uid_local", value); - save_userid_local = value; -} - -void set_userid(char *rUserId) -{ - userid = (char *) malloc(MAX_USERID_SIZE); - if (userid && rUserId) - strcpy(userid, rUserId); -} diff --git a/qt-ui/subsurfacewebservices.h b/qt-ui/subsurfacewebservices.h index f3fbb5b63..4419b1c6b 100644 --- a/qt-ui/subsurfacewebservices.h +++ b/qt-ui/subsurfacewebservices.h @@ -101,8 +101,6 @@ private: #ifdef __cplusplus extern "C" { #endif -extern short save_userid_local; -extern char *userid; extern void set_save_userid_local(short value); extern void set_userid(char *user_id); #ifdef __cplusplus |