diff options
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/mainwindow.cpp | 1 | ||||
-rw-r--r-- | desktop-widgets/subsurfacewebservices.cpp | 16 |
2 files changed, 13 insertions, 4 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index 67666a68f..93cd2d408 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -209,6 +209,7 @@ MainWindow::MainWindow() : QMainWindow(), if (!locationProvider->hasLocationsSource()) { ui.menuFile->removeAction(ui.add_GPS_location_here); } + ui.mainErrorMessage->hide(); graphics()->setEmptyState(); initialUiSetup(); diff --git a/desktop-widgets/subsurfacewebservices.cpp b/desktop-widgets/subsurfacewebservices.cpp index d66d3653b..a11949122 100644 --- a/desktop-widgets/subsurfacewebservices.cpp +++ b/desktop-widgets/subsurfacewebservices.cpp @@ -385,10 +385,18 @@ void WebServices::resetState() SubsurfaceWebServices::SubsurfaceWebServices(QWidget *parent, Qt::WindowFlags f) : WebServices(parent, f) { QSettings s; - if (!prefs.save_userid_local || !*prefs.userid) - ui.userID->setText(s.value("subsurface_webservice_uid").toString().toUpper()); - else - ui.userID->setText(prefs.userid); + + // figure out if we know (or can determine) the user's web service userid + QString userid(prefs.userid); + if (userid.isEmpty()) + userid = s.value("subsurface_webservice_uid").toString().toUpper(); + if (userid.isEmpty() && + !same_string(prefs.cloud_storage_email, "") && + !same_string(prefs.cloud_storage_password, "")) + userid = GpsLocation::instance()->getUserid(prefs.cloud_storage_email, prefs.cloud_storage_password); + + ui.userID->setText(userid); + hidePassword(); hideUpload(); ui.progressBar->setFormat(tr("Enter User ID and click Download")); |