mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +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 "desktop-widgets/subsurfacewebservices.h" | ||||||
| #include "core/qthelper.h" | #include "core/qthelper.h" | ||||||
| #include "core/cloudstorage.h" | #include "core/cloudstorage.h" | ||||||
|  | #include "core/settings/qPrefCloudStorage.h" | ||||||
| 
 | 
 | ||||||
| #include <QDesktopServices> | #include <QDesktopServices> | ||||||
| #include <QSettings> | 
 | ||||||
| 
 | 
 | ||||||
| DiveShareExportDialog::DiveShareExportDialog(QWidget *parent) : | DiveShareExportDialog::DiveShareExportDialog(QWidget *parent) : | ||||||
| 	QDialog(parent), | 	QDialog(parent), | ||||||
|  | @ -43,12 +44,8 @@ void DiveShareExportDialog::prepareDivesForUpload(bool selected) | ||||||
| 	ui->frameConfigure->setVisible(true); | 	ui->frameConfigure->setVisible(true); | ||||||
| 	ui->frameResults->setVisible(false); | 	ui->frameResults->setVisible(false); | ||||||
| 
 | 
 | ||||||
| 	QSettings settings; | 	ui->txtUID->setText(qPrefCloudStorage::diveshare_uid()); | ||||||
| 	if (settings.contains("diveshareExport/uid")) | 	ui->chkPrivate->setChecked(qPrefCloudStorage::diveshare_private()); | ||||||
| 		ui->txtUID->setText(settings.value("diveshareExport/uid").toString()); |  | ||||||
| 
 |  | ||||||
| 	if (settings.contains("diveshareExport/private")) |  | ||||||
| 		ui->chkPrivate->setChecked(settings.value("diveshareExport/private").toBool()); |  | ||||||
| 
 | 
 | ||||||
| 	show(); | 	show(); | ||||||
| } | } | ||||||
|  | @ -108,9 +105,8 @@ void DiveShareExportDialog::finishedSlot() | ||||||
| void DiveShareExportDialog::doUpload() | void DiveShareExportDialog::doUpload() | ||||||
| { | { | ||||||
| 	//Store current settings
 | 	//Store current settings
 | ||||||
| 	QSettings settings; | 	qPrefCloudStorage::set_diveshare_uid(ui->txtUID->text()); | ||||||
| 	settings.setValue("diveshareExport/uid", ui->txtUID->text()); | 	qPrefCloudStorage::set_diveshare_private(ui->chkPrivate->isChecked()); | ||||||
| 	settings.setValue("diveshareExport/private", ui->chkPrivate->isChecked()); |  | ||||||
| 
 | 
 | ||||||
| 	//Change UI into results mode
 | 	//Change UI into results mode
 | ||||||
| 	ui->frameConfigure->setVisible(false); | 	ui->frameConfigure->setVisible(false); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue