Open last used databases on startup.

Refs #36
This commit is contained in:
Florian Geyer 2013-04-18 22:15:01 +02:00
parent f0985ff9d9
commit 6f92188323

View File

@ -58,5 +58,14 @@ int main(int argc, char** argv)
mainWindow.openDatabase(filename, argumentMap.value("password"), QString());
}
if (config()->get("OpenPreviousDatabasesOnStartup").toBool()) {
QStringList filenames = config()->get("OpenDatabasesOnExit").toStringList();
Q_FOREACH (const QString& filename, filenames) {
if (!filename.isEmpty() && QFile::exists(filename)) {
mainWindow.openDatabase(filename, argumentMap.value("password"), QString());
}
}
}
return app.exec();
}