diff options
author | UnavailableDev <69792062+UnavailableDev@users.noreply.github.com> | 2022-10-24 17:02:09 +0200 |
---|---|---|
committer | UnavailableDev <69792062+UnavailableDev@users.noreply.github.com> | 2022-10-24 17:02:09 +0200 |
commit | 94db9a165fbb95d951d76cebb0937240b5d39545 (patch) | |
tree | 7aca9c28a4b28e1dd0e89e0f5ef0bf52c4310939 /client/dbconnector.cpp | |
parent | 093f18ab363840fff796c14e6c7ad7b93dd0ffc6 (diff) |
't worked just a minute ago'
Diffstat (limited to 'client/dbconnector.cpp')
-rw-r--r-- | client/dbconnector.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/client/dbconnector.cpp b/client/dbconnector.cpp index 5ed1efc..e925851 100644 --- a/client/dbconnector.cpp +++ b/client/dbconnector.cpp @@ -26,19 +26,16 @@ void dbConnector::on_pushButton_login_clicked() QString hostname = ui->lineEdit_adress->text(); QString username = ui->lineEdit_username->text(); QString password = ui->lineEdit_password->text(); - QString databaseName = "thecrapbox"; + QString databaseName = ui->lineEdit_database->text(); -// QSqlDatabase db = MainWindow.loginDb(adress, username, password); - -// QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL"); -// return; dbRef.setHostName(hostname); dbRef.setUserName(username); dbRef.setPassword(password); - dbRef.setDatabaseName("thecrapbox"); + dbRef.setDatabaseName(databaseName); if(dbRef.open()){ QMessageBox::information(this, "Connection", "GREAT SUCCES!"); + dbConnector::~dbConnector(); } else { QMessageBox::warning(this, "No connection", "Failed to connect"); } |