Better error message for invalid db file

This commit is contained in:
louis 2018-11-09 18:36:15 -05:00 committed by Jonathan White
parent 82bf00de73
commit 156b480f93

View File

@ -484,11 +484,11 @@ Database* Database::openDatabaseFile(const QString& fileName, QSharedPointer<con
QFile dbFile(fileName); QFile dbFile(fileName);
if (!dbFile.exists()) { if (!dbFile.exists()) {
qCritical("File %s does not exist.", qPrintable(fileName)); qCritical("Database file %s does not exist.", qPrintable(fileName));
return nullptr; return nullptr;
} }
if (!dbFile.open(QIODevice::ReadOnly)) { if (!dbFile.open(QIODevice::ReadOnly)) {
qCritical("Unable to open file %s.", qPrintable(fileName)); qCritical("Unable to open database file %s.", qPrintable(fileName));
return nullptr; return nullptr;
} }