Store connection configuration as key value pairs
Add migration for the sqlite database. Because the Qt SQL library is a bit hard to work with use sqlite through custom wrapper.
This commit is contained in:
parent
4caccf1000
commit
aac55b0ed1
17 changed files with 276439 additions and 384 deletions
|
|
@ -30,15 +30,7 @@ MasterController::~MasterController()
|
|||
|
||||
void MasterController::init()
|
||||
{
|
||||
m_userConfigDatabase = QSqlDatabase::addDatabase("QSQLITE");
|
||||
m_userConfigDatabase.setDatabaseName(GetUserConfigDatabaseName());
|
||||
|
||||
if (!m_userConfigDatabase.open()) {
|
||||
qDebug() << "Error: connection with database fail";
|
||||
}
|
||||
else {
|
||||
qDebug() << "Database: connection ok";
|
||||
}
|
||||
m_userConfigDatabase.Open(GetUserConfigDatabaseName());
|
||||
|
||||
m_connectionController = new ConnectionController(this);
|
||||
m_connectionController->init();
|
||||
|
|
@ -62,7 +54,7 @@ ConnectionController *MasterController::connectionController()
|
|||
return m_connectionController;
|
||||
}
|
||||
|
||||
QSqlDatabase& MasterController::userConfigDatabase()
|
||||
SQLiteConnection& MasterController::userConfigDatabase()
|
||||
{
|
||||
return m_userConfigDatabase;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue