mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	mobile-widgets: remove QSettings
update qmlprefs and qmlmanager to use qPref Signed-off-by: Jan Iversen <jani@apache.org>
This commit is contained in:
		
							parent
							
								
									b7a1bb670c
								
							
						
					
					
						commit
						da6e8a4cd5
					
				
					 2 changed files with 12 additions and 31 deletions
				
			
		|  | @ -143,16 +143,12 @@ void QMLPrefs::setTimeThreshold(int time) | |||
| 
 | ||||
| const QString QMLPrefs::theme() const | ||||
| { | ||||
| 	QSettings s; | ||||
| 	s.beginGroup("Theme"); | ||||
| 	return s.value("currentTheme", "Blue").toString(); | ||||
| 	return qPrefDisplay::theme(); | ||||
| } | ||||
| 
 | ||||
| void QMLPrefs::setTheme(QString theme) | ||||
| { | ||||
| 	QSettings s; | ||||
| 	s.beginGroup("Theme"); | ||||
| 	s.setValue("currentTheme", theme); | ||||
| 	qPrefDisplay::set_theme(theme); | ||||
| 	emit themeChanged(); | ||||
| } | ||||
| 
 | ||||
|  | @ -175,14 +171,11 @@ void QMLPrefs::cancelCredentialsPinSetup() | |||
| 	 * Notice that this function is also used to switch to a different | ||||
| 	 * cloud account, so the name is not perfect. | ||||
| 	 */ | ||||
| 	QSettings s; | ||||
| 	 | ||||
| 	setCredentialStatus(qPref::CS_UNKNOWN); | ||||
| 	s.beginGroup("CloudStorage"); | ||||
| 	s.setValue("email", m_cloudUserName); | ||||
| 	s.setValue("password", m_cloudPassword); | ||||
| 	s.setValue("cloud_verification_status", m_credentialStatus); | ||||
| 	s.sync(); | ||||
| 	qPrefCloudStorage::set_cloud_storage_email(m_cloudUserName); | ||||
| 	qPrefCloudStorage::set_cloud_storage_password(m_cloudPassword); | ||||
| 	qPrefCloudStorage::set_cloud_verification_status(m_credentialStatus); | ||||
| 	QMLManager::instance()->setStartPageText(tr("Starting...")); | ||||
| 	 | ||||
| 	setShowPin(false); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue