From eb8665a8c4b6a15a9d5a9f5b348432293d171ae6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Janne=20=C3=84n=C3=A4kk=C3=A4l=C3=A4?= Date: Fri, 28 May 2010 14:44:35 +0300 Subject: [PATCH 1/1] Fixed bugs 5711 and 5832. Now graph's line wont draw out of the diagram and messagebox gives more reasonable information when wrong password has been given to the server. --- Client/accrealtimedialog.cpp | 1 + Client/calculate.cpp | 1 + Client/httpclient.cpp | 2 +- Client/settingsdialog.cpp | 5 ++--- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Client/accrealtimedialog.cpp b/Client/accrealtimedialog.cpp index 4b46af1..4406a08 100644 --- a/Client/accrealtimedialog.cpp +++ b/Client/accrealtimedialog.cpp @@ -185,6 +185,7 @@ void AccRealTimeDialog::readAccelerometerData() { resultDialog->setValue(i*10,tempMap[i*10]); } + calculate->reset(); resultDialog->show(); this->hide(); } diff --git a/Client/calculate.cpp b/Client/calculate.cpp index edd4246..415655c 100644 --- a/Client/calculate.cpp +++ b/Client/calculate.cpp @@ -66,6 +66,7 @@ void Calculate::reset() checkPointCounter = 0; checkPoint = speedCheckPoints[checkPointCounter]; + valuesMap.clear(); } diff --git a/Client/httpclient.cpp b/Client/httpclient.cpp index e43f761..6e43dfd 100644 --- a/Client/httpclient.cpp +++ b/Client/httpclient.cpp @@ -407,7 +407,7 @@ void HttpClient::ackOfLogin() qDebug() << "errorcode:" << errorcode << reply->errorString(); if(myMainw->settingsDialog) { - QMessageBox::about(myMainw->settingsDialog, "Server does not recognize your username. Please registrate.",reply->errorString()); + QMessageBox::about(myMainw->settingsDialog, "Wrong username or password!","Please try again."); myMainw->settingsDialog->usernameOk(false); } } diff --git a/Client/settingsdialog.cpp b/Client/settingsdialog.cpp index 935b88d..4729a01 100644 --- a/Client/settingsdialog.cpp +++ b/Client/settingsdialog.cpp @@ -206,10 +206,9 @@ void SettingsDialog::usernameOk(bool isOk) else { ui->setUserPushButton->setText("Log in"); - ui->setUserUsernameLineEdit->clear(); ui->setUserPasswordLineEdit->clear(); - this->username = ui->setUserUsernameLineEdit->text(); - this->password = ui->setUserPasswordLineEdit->text(); + this->username = ""; + this->password = ""; saveLogin( this->username, this->password); ui->pushButtonProfile->setDisabled(true); } -- 1.7.9.5