From a887f5c211326741dffdcb38d08577226358e2e2 Mon Sep 17 00:00:00 2001 From: Liran BN Date: Tue, 17 Jun 2014 17:09:51 +0300 Subject: [PATCH] fix reconnect if already connected --- main/main.cpp | 1 - main/mainscreen.cpp | 5 ++++- src/jce/jcelogin.cpp | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/main/main.cpp b/main/main.cpp index 32d91aa..f1a5f93 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -7,6 +7,5 @@ int main(int argc, char *argv[]) MainScreen w; w.show(); - return a.exec(); } diff --git a/main/mainscreen.cpp b/main/mainscreen.cpp index 83344c8..a79d9f7 100644 --- a/main/mainscreen.cpp +++ b/main/mainscreen.cpp @@ -34,7 +34,7 @@ MainScreen::MainScreen(QWidget *parent) :QMainWindow(parent), ui(new Ui::MainScr updateDates(); - + std::cout << "hello world" << std::endl; } @@ -166,6 +166,9 @@ void MainScreen::uiSetDisconnectMode() void MainScreen::uiSetConnectMode() { + if (this->jceLog != NULL) + delete jceLog; + string username; string password; if ((ui->usrnmLineEdit->text().isEmpty()) || (ui->pswdLineEdit->text().isEmpty())) diff --git a/src/jce/jcelogin.cpp b/src/jce/jcelogin.cpp index 8706f62..7833023 100644 --- a/src/jce/jcelogin.cpp +++ b/src/jce/jcelogin.cpp @@ -27,6 +27,7 @@ void jceLogin::makeConnection() throw (jceStatus) { if (makeFirstVisit() == true) //requst and send first validation { + status = jceStatus::JCE_FIRST_VALIDATION_PASSED; if (checkValidation() == true) //check if username and password are matching {