thanks
Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
This commit is contained in:
parent
a624fd502a
commit
fd250ee13d
@ -20,12 +20,10 @@
|
|||||||
DBManager::DBManager() :
|
DBManager::DBManager() :
|
||||||
DRIVER("QSQLITE")
|
DRIVER("QSQLITE")
|
||||||
{
|
{
|
||||||
QFileInfo *db_info = new QFileInfo;
|
const QString db_filename = "config/akashi.db";
|
||||||
*db_info = QFileInfo("config/akashi.db");
|
QFileInfo db_info(db_filename);
|
||||||
if(!(db_info->isReadable()) || !(db_info->isWritable()))
|
if(!db_info.isReadable() || !db_info.isWritable())
|
||||||
qCritical() << "Database Error: Missing permissions. Check if \"config/akashi.db\" is writable.\n";
|
qCritical() << tr("Database Error: Missing permissions. Check if \"%1\" is writable.").arg(db_filename);
|
||||||
delete db_info;
|
|
||||||
|
|
||||||
|
|
||||||
db = QSqlDatabase::addDatabase(DRIVER);
|
db = QSqlDatabase::addDatabase(DRIVER);
|
||||||
db.setDatabaseName("config/akashi.db");
|
db.setDatabaseName("config/akashi.db");
|
||||||
|
Loading…
Reference in New Issue
Block a user