mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-12 01:29:38 -04:00
Prioritize explicit databases.
This commit is contained in:
parent
86e88c18b0
commit
beba23ea2e
1 changed files with 9 additions and 9 deletions
18
src/main.cpp
18
src/main.cpp
|
@ -115,6 +115,15 @@ int main(int argc, char** argv)
|
||||||
mainWindow.show();
|
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++) {
|
for (int ii=0; ii < args.length(); ii++) {
|
||||||
QString filename = args[ii];
|
QString filename = args[ii];
|
||||||
if (!filename.isEmpty() && QFile::exists(filename)) {
|
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();
|
int exitCode = app.exec();
|
||||||
|
|
||||||
#if defined(WITH_ASAN) && defined(WITH_LSAN)
|
#if defined(WITH_ASAN) && defined(WITH_LSAN)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue