mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
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>
This commit is contained in:
parent
0a01072deb
commit
bba9385d76
1 changed files with 6 additions and 10 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue