Login bug fixed. Now result can't send to server without login.
authorJanne Änäkkälä <janne.anakkala@fudeco.com>
Wed, 21 Apr 2010 07:11:22 +0000 (10:11 +0300)
committerJanne Änäkkälä <janne.anakkala@fudeco.com>
Wed, 21 Apr 2010 07:11:22 +0000 (10:11 +0300)
Client/mainwindow.cpp
Client/resultdialog.cpp
Client/settingsdialog.cpp

index 7706106..7b04b08 100644 (file)
@@ -150,7 +150,7 @@ void MainWindow::on_pushButtonAccelerate_clicked()
     if(!accstart)
         accstart = new accelerationstart(this);
     connect(accstart, SIGNAL(sendresult(QString, double)), this, SLOT(clientSendResult(QString, double)));
-    connect(topResultDialog, SIGNAL(rejected()), this, SLOT(killDialog()));
+    connect(accstart, SIGNAL(rejected()), this, SLOT(killDialog()));
     accstart->show();
 }
 
index e53db80..0662fe2 100644 (file)
@@ -69,6 +69,9 @@ ResultDialog::ResultDialog(QWidget *parent) :
         timeArray[i] = 0;
     }
 
+    //Clear info label
+    ui->labelInfoToUser->setText("");
+
     if (loginSaved())
     {
         ui->pushButtonSend->setEnabled(true);
@@ -76,10 +79,8 @@ ResultDialog::ResultDialog(QWidget *parent) :
     else
     {
         ui->pushButtonSend->setEnabled(false);
+        ui->labelInfoToUser->setText("You're not logged! Please register or log in and accelerate again.");
     }
-
-    //Clear info label
-    ui->labelInfoToUser->setText("");
 }
 
 /**
index ab584e9..fb5d7c0 100644 (file)
@@ -199,5 +199,8 @@ void SettingsDialog::usernameOk(bool isOk)
         ui->setUserPushButton->setText("Log in");
         ui->setUserUsernameLineEdit->clear();
         ui->setUserPasswordLineEdit->clear();
+        this->username = ui->setUserUsernameLineEdit->text();
+        this->password = ui->setUserPasswordLineEdit->text();
+        saveLogin( this->username, this->password);
     }
 }