mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Revert "desktop-widgets: remove QSettings from desktop-widgets"
This reverts commit 321a920a98
.
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>
This commit is contained in:
parent
4bb72160a6
commit
2d87a657d2
6 changed files with 55 additions and 28 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue