mirror of
https://github.com/chris2511/xca.git
synced 2026-09-12 19:51:05 +05:00
database_model: better handle uncreateable databases
Current implementation did not check whether a non-existing database-file could be created. Throw an error message if the database file cannot be created. Simply by using XFile instead of QFile.
This commit is contained in:
parent
0232d20b2b
commit
d54819e15b
@ -542,7 +542,7 @@ void database_model::openLocalDatabase(const QString &connName,
|
||||
const QString &descriptor)
|
||||
{
|
||||
QSqlDatabase db = QSqlDatabase::database(connName);
|
||||
QFile f(descriptor);
|
||||
XFile f(descriptor);
|
||||
qDebug() << connName << descriptor;
|
||||
if (!f.exists(descriptor)) {
|
||||
f.open(QIODevice::WriteOnly);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user