diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-07-06 13:59:14 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-07-06 13:59:14 -0700 |
commit | b1538c809d0ce5abe489822f9d2b21287a0a38d5 (patch) | |
tree | 303fbcb44fbd14d0039293cdc7e9a34e8b2424ba /qt-ui/preferences.cpp | |
parent | e76675d4df466448a33532895dd371aa498a0e49 (diff) | |
download | subsurface-b1538c809d0ce5abe489822f9d2b21287a0a38d5.tar.gz |
Code cleanup
Make precedence of && over || explicit.
Explicitly convert between char * and unsigned char *.
Don't assign potentially negative return code to an unsigend variable.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/preferences.cpp')
-rw-r--r-- | qt-ui/preferences.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/preferences.cpp b/qt-ui/preferences.cpp index c9c44adc7..b30e76e03 100644 --- a/qt-ui/preferences.cpp +++ b/qt-ui/preferences.cpp @@ -417,7 +417,7 @@ void PreferencesDialog::syncSettings() if (!email.isEmpty() && !password.isEmpty()) { // connect to backend server to check / create credentials QRegularExpression reg("^[a-zA-Z0-9@.+_-]+$"); - 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("Cloud storage email and password can only consist of letters, numbers, and '.', '-', '_', and '+'."))); } else { CloudStorageAuthenticate *cloudAuth = new CloudStorageAuthenticate(this); |