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() :
|
||||
DRIVER("QSQLITE")
|
||||
{
|
||||
QFileInfo *db_info = new QFileInfo;
|
||||
*db_info = QFileInfo("config/akashi.db");
|
||||
if(!(db_info->isReadable()) || !(db_info->isWritable()))
|
||||
qCritical() << "Database Error: Missing permissions. Check if \"config/akashi.db\" is writable.\n";
|
||||
delete db_info;
|
||||
|
||||
const QString db_filename = "config/akashi.db";
|
||||
QFileInfo db_info(db_filename);
|
||||
if(!db_info.isReadable() || !db_info.isWritable())
|
||||
qCritical() << tr("Database Error: Missing permissions. Check if \"%1\" is writable.").arg(db_filename);
|
||||
|
||||
db = QSqlDatabase::addDatabase(DRIVER);
|
||||
db.setDatabaseName("config/akashi.db");
|
||||
|
Loading…
Reference in New Issue
Block a user