Bug fixed. Now user can't send register request if one or more of the registration...
authorJanne Änäkkälä <janne.anakkala@fudeco.com>
Wed, 21 Apr 2010 11:56:03 +0000 (14:56 +0300)
committerJanne Änäkkälä <janne.anakkala@fudeco.com>
Wed, 21 Apr 2010 11:56:03 +0000 (14:56 +0300)
Client/settingsdialog.cpp

index fb5d7c0..8e96b2f 100644 (file)
@@ -62,7 +62,15 @@ void SettingsDialog::on_registratePushButton_clicked()
     this->regPassword = ui->regPasswordLineEdit->text();
     this->regEmail = ui->regEMailLineEdit->text();
 
     this->regPassword = ui->regPasswordLineEdit->text();
     this->regEmail = ui->regEMailLineEdit->text();
 
-    emit sendregistration();
+    if (this->regUsername.compare("") && this->regPassword.compare("") && this->regEmail.compare("") && this->regEmail.compare("@"))
+    {
+        emit sendregistration();
+
+    }
+    else
+    {
+        QMessageBox::about(this, "One or more of the fields is empty", "Set username (3-12 characters), password (at least 6 characters) and valid email address");
+    }
 
     //close();      //using close() hides popup-window which reports error from server
 }
 
     //close();      //using close() hides popup-window which reports error from server
 }