mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-15 09:17:28 -05:00
Prioritize explicit databases.
This commit is contained in:
parent
86e88c18b0
commit
beba23ea2e
18
src/main.cpp
18
src/main.cpp
@ -115,6 +115,15 @@ int main(int argc, char** argv)
|
||||
mainWindow.show();
|
||||
}
|
||||
|
||||
if (config()->get("OpenPreviousDatabasesOnStartup").toBool()) {
|
||||
const QStringList filenames = config()->get("LastOpenedDatabases").toStringList();
|
||||
for (const QString& filename : filenames) {
|
||||
if (!filename.isEmpty() && QFile::exists(filename)) {
|
||||
mainWindow.openDatabase(filename, QString(), QString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int ii=0; ii < args.length(); ii++) {
|
||||
QString filename = args[ii];
|
||||
if (!filename.isEmpty() && QFile::exists(filename)) {
|
||||
@ -127,15 +136,6 @@ int main(int argc, char** argv)
|
||||
}
|
||||
}
|
||||
|
||||
if (config()->get("OpenPreviousDatabasesOnStartup").toBool()) {
|
||||
const QStringList filenames = config()->get("LastOpenedDatabases").toStringList();
|
||||
for (const QString& filename : filenames) {
|
||||
if (!filename.isEmpty() && QFile::exists(filename)) {
|
||||
mainWindow.openDatabase(filename, QString(), QString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int exitCode = app.exec();
|
||||
|
||||
#if defined(WITH_ASAN) && defined(WITH_LSAN)
|
||||
|
Loading…
Reference in New Issue
Block a user