From b1538c809d0ce5abe489822f9d2b21287a0a38d5 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 6 Jul 2015 13:59:14 -0700 Subject: 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 --- qt-ui/preferences.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-ui') 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); -- cgit v1.2.3-70-g09d2