void CloudSyncManager::setOwncloudPassword( const QString &password ) { if ( d->m_owncloudPassword != password ) { d->m_owncloudPassword = password; emit owncloudPasswordChanged( d->m_owncloudPassword ); emit apiUrlChanged( apiUrl() ); } }
void CloudSyncManager::setOwncloudUsername( const QString &username ) { if ( d->m_owncloudUsername != username ) { d->m_owncloudUsername = username; emit owncloudUsernameChanged( d->m_owncloudUsername ); emit apiUrlChanged( apiUrl() ); } }
void CloudSyncManager::setOwncloudServer( const QString &server ) { if ( d->m_ownloudServer != server ) { d->m_ownloudServer = server; emit owncloudServerChanged( d->m_ownloudServer ); emit apiUrlChanged( apiUrl() ); } }
void CloudSyncManager::setOwncloudCredentials( const QString &server, const QString &user, const QString &password ) { QUrl const oldApiUrl = apiUrl(); blockSignals( true ); setOwncloudServer( server ); setOwncloudUsername( user ); setOwncloudPassword( password ); blockSignals( false ); if ( oldApiUrl != apiUrl() ) { emit apiUrlChanged( apiUrl() ); } }
void CloudSyncManager::setOwncloudServer( const QString &server ) { QString const oldProtocol = d->m_owncloudProtocol; QString const oldServer = d->m_ownloudServer; if ( server.startsWith( "http://" ) ) { d->m_owncloudProtocol = "http://"; d->m_ownloudServer = server.mid( 7 ); } else if ( server.startsWith( "https://" ) ) { d->m_owncloudProtocol = "https://"; d->m_ownloudServer = server.mid ( 8 ); } else { d->m_owncloudProtocol = "http://"; d->m_ownloudServer = server; } if ( oldServer != d->m_ownloudServer ) { emit owncloudServerChanged( owncloudServer() ); emit apiUrlChanged( apiUrl() ); } else if ( oldProtocol != d->m_owncloudProtocol ) { emit apiUrlChanged( apiUrl() ); } }