src/db/dataconnect.cpp
void DataConnect::openDB(){
     this->db = QSqlDatabase::addDatabase("QMYSQL", "test");
     this->db.setHostName(QString(data->getHost().c_str()));
     this->db.setDatabaseName(QString(data->getName().c_str()));
     this->db.setUserName(QString(data->getUser().c_str()));
     this->db.setPassword(QString(data->getPass().c_str()));

}
/*
  * open mysql database from global preferences
  */
open mysql database from global preferences
open mysql database from global preferences
void DataConnect::openDB(){
     this->db = QSqlDatabase::addDatabase("QMYSQL", "test");
     this->db.setHostName(QString(data->getHost().c_str()));
     this->db.setDatabaseName(QString(data->getName().c_str()));
     this->db.setUserName(QString(data->getUser().c_str()));
     this->db.setPassword(QString(data->getPass().c_str()));
}
void DataConnect :: openDB ( ) { this -> db = QSqlDatabase :: addDatabase ( " " , " " ) ; this -> db . setHostName ( QString ( data -> getHost ( ) . c_str ( ) ) ) ; this -> db . setDatabaseName ( QString ( data -> getName ( ) . c_str ( ) ) ) ; this -> db . setUserName ( QString ( data -> getUser ( ) . c_str ( ) ) ) ; this -> db . setPassword ( QString ( data -> getPass ( ) . c_str ( ) ) ) ; }
open mysql database from global preferences
open mysql database from global preferences