summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/diveshareexportdialog.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2018-08-29 03:08:47 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-08-29 03:09:10 -0700
commit2d87a657d248c1c6d4dd6a805bbf90c98589798a (patch)
tree3f0e3a9f6c5e072a67c936e3bbf5d17957431816 /desktop-widgets/diveshareexportdialog.cpp
parent4bb72160a6323e1ab3f3d9ea2c7f90c21088347f (diff)
downloadsubsurface-2d87a657d248c1c6d4dd6a805bbf90c98589798a.tar.gz
Revert "desktop-widgets: remove QSettings from desktop-widgets"
This reverts commit 321a920a9873a3828a24c1b28cf8eb5fe1bff2cb. It appears that the load_xxx functions aren't called, so while the correct values are stored to the settings, they aren't retrieved. Let's revert while this gets fixed. Fixes #1609 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/diveshareexportdialog.cpp')
-rw-r--r--desktop-widgets/diveshareexportdialog.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/desktop-widgets/diveshareexportdialog.cpp b/desktop-widgets/diveshareexportdialog.cpp
index fc26e0ced..2689eaca8 100644
--- a/desktop-widgets/diveshareexportdialog.cpp
+++ b/desktop-widgets/diveshareexportdialog.cpp
@@ -6,9 +6,9 @@
#include "desktop-widgets/subsurfacewebservices.h"
#include "core/qthelper.h"
#include "core/cloudstorage.h"
-#include "core/settings/qPrefGeneral.h"
#include <QDesktopServices>
+#include <QSettings>
DiveShareExportDialog::DiveShareExportDialog(QWidget *parent) :
QDialog(parent),
@@ -43,11 +43,12 @@ void DiveShareExportDialog::prepareDivesForUpload(bool selected)
ui->frameConfigure->setVisible(true);
ui->frameResults->setVisible(false);
- if (qPrefGeneral::diveshareExport_uid() != "")
- ui->txtUID->setText(qPrefGeneral::diveshareExport_uid());
+ QSettings settings;
+ if (settings.contains("diveshareExport/uid"))
+ ui->txtUID->setText(settings.value("diveshareExport/uid").toString());
- if (qPrefGeneral::diveshareExport_private())
- ui->chkPrivate->setChecked(qPrefGeneral::diveshareExport_private());
+ if (settings.contains("diveshareExport/private"))
+ ui->chkPrivate->setChecked(settings.value("diveshareExport/private").toBool());
show();
}
@@ -107,8 +108,9 @@ void DiveShareExportDialog::finishedSlot()
void DiveShareExportDialog::doUpload()
{
//Store current settings
- qPrefGeneral::set_diveshareExport_uid(ui->txtUID->text());
- qPrefGeneral::set_diveshareExport_private(ui->chkPrivate->isChecked());
+ QSettings settings;
+ settings.setValue("diveshareExport/uid", ui->txtUID->text());
+ settings.setValue("diveshareExport/private", ui->chkPrivate->isChecked());
//Change UI into results mode
ui->frameConfigure->setVisible(false);