summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/diveshareexportdialog.cpp
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2019-12-08 16:47:23 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-12-11 11:08:51 -0500
commitbba9385d769fc56fcd051106aa400359719b0bfb (patch)
tree54b10590317a1e6c5ae841bf62088f2816805e88 /desktop-widgets/diveshareexportdialog.cpp
parent0a01072deb4bd6b5fe78daf7ed5713eaeb73254b (diff)
downloadsubsurface-bba9385d769fc56fcd051106aa400359719b0bfb.tar.gz
desktop-widgets: use qPrefCloudStorage for diveshare.
Diveshare upload in mobile is using qPrefCloudStorage, so change diveshareexportdialog as well, to keep consistency. Signed-off-by: Jan Iversen <jan@casacondor.com>
Diffstat (limited to 'desktop-widgets/diveshareexportdialog.cpp')
-rw-r--r--desktop-widgets/diveshareexportdialog.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/desktop-widgets/diveshareexportdialog.cpp b/desktop-widgets/diveshareexportdialog.cpp
index 2689eaca8..c35ac5d43 100644
--- a/desktop-widgets/diveshareexportdialog.cpp
+++ b/desktop-widgets/diveshareexportdialog.cpp
@@ -6,9 +6,10 @@
#include "desktop-widgets/subsurfacewebservices.h"
#include "core/qthelper.h"
#include "core/cloudstorage.h"
+#include "core/settings/qPrefCloudStorage.h"
#include <QDesktopServices>
-#include <QSettings>
+
DiveShareExportDialog::DiveShareExportDialog(QWidget *parent) :
QDialog(parent),
@@ -43,12 +44,8 @@ void DiveShareExportDialog::prepareDivesForUpload(bool selected)
ui->frameConfigure->setVisible(true);
ui->frameResults->setVisible(false);
- QSettings settings;
- if (settings.contains("diveshareExport/uid"))
- ui->txtUID->setText(settings.value("diveshareExport/uid").toString());
-
- if (settings.contains("diveshareExport/private"))
- ui->chkPrivate->setChecked(settings.value("diveshareExport/private").toBool());
+ ui->txtUID->setText(qPrefCloudStorage::diveshare_uid());
+ ui->chkPrivate->setChecked(qPrefCloudStorage::diveshare_private());
show();
}
@@ -108,9 +105,8 @@ void DiveShareExportDialog::finishedSlot()
void DiveShareExportDialog::doUpload()
{
//Store current settings
- QSettings settings;
- settings.setValue("diveshareExport/uid", ui->txtUID->text());
- settings.setValue("diveshareExport/private", ui->chkPrivate->isChecked());
+ qPrefCloudStorage::set_diveshare_uid(ui->txtUID->text());
+ qPrefCloudStorage::set_diveshare_private(ui->chkPrivate->isChecked());
//Change UI into results mode
ui->frameConfigure->setVisible(false);