Do not try to open a non-existing database.

This commit is contained in:
Florian Geyer 2012-07-28 10:19:32 +02:00
parent 886187baee
commit 15c18dd899

View File

@ -105,6 +105,11 @@ void DatabaseTabWidget::openDatabase(const QString& fileName, const QString& pw,
{
QFileInfo fileInfo(fileName);
QString canonicalFilePath = fileInfo.canonicalFilePath();
if (canonicalFilePath.isEmpty()) {
QMessageBox::warning(this, tr("Warning"), tr("File not found!"));
return;
}
QHashIterator<Database*, DatabaseManagerStruct> i(m_dbList);
while (i.hasNext()) {