mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Whitespace only
Now that we properly return when raising an error, do not if () else if(). Useles. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
parent
d28f48a793
commit
e592dfe17c
1 changed files with 11 additions and 12 deletions
|
@ -71,11 +71,12 @@ void PreferencesNetwork::syncSettings()
|
||||||
if (!reg.match(email).hasMatch() || (!password.isEmpty() && !reg.match(password).hasMatch())) {
|
if (!reg.match(email).hasMatch() || (!password.isEmpty() && !reg.match(password).hasMatch())) {
|
||||||
report_error(qPrintable(tr("Change ignored. Cloud storage email and password can only consist of letters, numbers, and '.', '-', '_', and '+'.")));
|
report_error(qPrintable(tr("Change ignored. Cloud storage email and password can only consist of letters, numbers, and '.', '-', '_', and '+'.")));
|
||||||
return;
|
return;
|
||||||
} else if (!reg.match(email).hasMatch() || (!newpassword.isEmpty() && !reg.match(newpassword).hasMatch())) {
|
}
|
||||||
|
if (!reg.match(email).hasMatch() || (!newpassword.isEmpty() && !reg.match(newpassword).hasMatch())) {
|
||||||
report_error(qPrintable(tr("Change ignored. Cloud storage email and new password can only consist of letters, numbers, and '.', '-', '_', and '+'.")));
|
report_error(qPrintable(tr("Change ignored. Cloud storage email and new password can only consist of letters, numbers, and '.', '-', '_', and '+'.")));
|
||||||
ui->cloud_storage_new_passwd->setText("");
|
ui->cloud_storage_new_passwd->setText("");
|
||||||
return;
|
return;
|
||||||
} else {
|
}
|
||||||
CloudStorageAuthenticate *cloudAuth = new CloudStorageAuthenticate(this);
|
CloudStorageAuthenticate *cloudAuth = new CloudStorageAuthenticate(this);
|
||||||
connect(cloudAuth, &CloudStorageAuthenticate::finishedAuthenticate, this, &PreferencesNetwork::updateCloudAuthenticationState);
|
connect(cloudAuth, &CloudStorageAuthenticate::finishedAuthenticate, this, &PreferencesNetwork::updateCloudAuthenticationState);
|
||||||
connect(cloudAuth, &CloudStorageAuthenticate::passwordChangeSuccessful, this, &PreferencesNetwork::passwordUpdateSuccessful);
|
connect(cloudAuth, &CloudStorageAuthenticate::passwordChangeSuccessful, this, &PreferencesNetwork::passwordUpdateSuccessful);
|
||||||
|
@ -83,7 +84,6 @@ void PreferencesNetwork::syncSettings()
|
||||||
ui->cloud_storage_new_passwd->setText("");
|
ui->cloud_storage_new_passwd->setText("");
|
||||||
cloud->setNewPassword(newpassword);
|
cloud->setNewPassword(newpassword);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else if (prefs.cloud_verification_status == CS_UNKNOWN ||
|
} else if (prefs.cloud_verification_status == CS_UNKNOWN ||
|
||||||
prefs.cloud_verification_status == CS_INCORRECT_USER_PASSWD ||
|
prefs.cloud_verification_status == CS_INCORRECT_USER_PASSWD ||
|
||||||
email != prefs.cloud_storage_email ||
|
email != prefs.cloud_storage_email ||
|
||||||
|
@ -99,12 +99,11 @@ void PreferencesNetwork::syncSettings()
|
||||||
report_error(qPrintable(tr("Cloud storage email and password can only consist of letters, numbers, and '.', '-', '_', and '+'.")));
|
report_error(qPrintable(tr("Cloud storage email and password can only consist of letters, numbers, and '.', '-', '_', and '+'.")));
|
||||||
cloud->setVerificationStatus(oldVerificationStatus);
|
cloud->setVerificationStatus(oldVerificationStatus);
|
||||||
return;
|
return;
|
||||||
} else {
|
}
|
||||||
CloudStorageAuthenticate *cloudAuth = new CloudStorageAuthenticate(this);
|
CloudStorageAuthenticate *cloudAuth = new CloudStorageAuthenticate(this);
|
||||||
connect(cloudAuth, &CloudStorageAuthenticate::finishedAuthenticate, this, &PreferencesNetwork::updateCloudAuthenticationState);
|
connect(cloudAuth, &CloudStorageAuthenticate::finishedAuthenticate, this, &PreferencesNetwork::updateCloudAuthenticationState);
|
||||||
cloudAuth->backend(email, password);
|
cloudAuth->backend(email, password);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else if (prefs.cloud_verification_status == CS_NEED_TO_VERIFY) {
|
} else if (prefs.cloud_verification_status == CS_NEED_TO_VERIFY) {
|
||||||
QString pin = ui->cloud_storage_pin->text();
|
QString pin = ui->cloud_storage_pin->text();
|
||||||
if (!pin.isEmpty()) {
|
if (!pin.isEmpty()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue