diff options
Diffstat (limited to 'desktop-widgets/diveshareexportdialog.cpp')
-rw-r--r-- | desktop-widgets/diveshareexportdialog.cpp | 16 |
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); |