From e753d97cfeafbe574fbd6f51c4f06dfebd0141e4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Janne=20=C3=84n=C3=A4kk=C3=A4l=C3=A4?= Date: Wed, 21 Apr 2010 14:56:03 +0300 Subject: [PATCH 1/1] Bug fixed. Now user can't send register request if one or more of the registration fields is empty. --- Client/settingsdialog.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Client/settingsdialog.cpp b/Client/settingsdialog.cpp index fb5d7c0..8e96b2f 100644 --- a/Client/settingsdialog.cpp +++ b/Client/settingsdialog.cpp @@ -62,7 +62,15 @@ void SettingsDialog::on_registratePushButton_clicked() 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 } -- 1.7.9.5