summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/diveshareexportdialog.cpp
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@apache.org>2018-08-20 11:19:49 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-08-25 11:49:47 -0700
commit321a920a9873a3828a24c1b28cf8eb5fe1bff2cb (patch)
treeef1dcbec683536af07ac86b1ed7f5c5856204707 /desktop-widgets/diveshareexportdialog.cpp
parent5f4a040dd217c07a341bd03fe80fe19747d1541e (diff)
downloadsubsurface-321a920a9873a3828a24c1b28cf8eb5fe1bff2cb.tar.gz
desktop-widgets: remove QSettings from desktop-widgets
The variables referenced are moved into qPref in earlier commits so in general all QSettings calls are replaced by qPref*:: calls Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'desktop-widgets/diveshareexportdialog.cpp')
-rw-r--r--desktop-widgets/diveshareexportdialog.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/desktop-widgets/diveshareexportdialog.cpp b/desktop-widgets/diveshareexportdialog.cpp
index 2689eaca8..fc26e0ced 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,12 +43,11 @@ 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 (qPrefGeneral::diveshareExport_uid() != "")
+ ui->txtUID->setText(qPrefGeneral::diveshareExport_uid());
- if (settings.contains("diveshareExport/private"))
- ui->chkPrivate->setChecked(settings.value("diveshareExport/private").toBool());
+ if (qPrefGeneral::diveshareExport_private())
+ ui->chkPrivate->setChecked(qPrefGeneral::diveshareExport_private());
show();
}
@@ -108,9 +107,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());
+ qPrefGeneral::set_diveshareExport_uid(ui->txtUID->text());
+ qPrefGeneral::set_diveshareExport_private(ui->chkPrivate->isChecked());
//Change UI into results mode
ui->frameConfigure->setVisible(false);