void NoAuthenticator::acceptLogin(NoUser* user) { if (d->socket) { loginAccepted(user); invalidate(); } }
void Login::on_buttonBox_accepted() { if (!ui_->username->text().isEmpty() & !ui_->password->text().isEmpty()) { //Connect to database with username and password of login bool ok = db_->connectToDB(ui_->username->text(), ui_->password->text()); if(ok) { character_->name_ = ui_->username->text(); //Emit a signal for main window to show when login accepted loginAccepted(); } else this->show(); } else { QMessageBox msgBox; msgBox.setText("You forgot to type username and/or password"); msgBox.exec(); } }
void IRCServer::handleServerMessage(const Message& message) { // Receivied Ping if(message.isPing()) sendMessage("PONG :" + message.content()); // Successfully logged in else if (message.command() == IRC::Reply::WELCOME) { loggedIn_m = true; sendCommandsInQueue(); emit loginAccepted(); } }
void LoginDialog::handleValidAuthentication() { if(ui->checkBoxAutoLogin->isChecked()) { _config->setAutoLogin(true); _config->setHostParameters(ui->lineEditIP->text(), ui->spinBoxPort->value()); _config->setLogin(convertToNoSpace(ui->lineEditUsername->text()), convertToNoSpace(ui->lineEditPassword->text())); _config->saveToFile(); } else { _config->setAutoLogin(false); _config->setHostParameters(ui->lineEditIP->text(), ui->spinBoxPort->value()); _config->setLogin("", ""); _config->saveToFile(); } emit loginAccepted(); return; }