From ea5c6c1eb58a27785f32c000359cf0ba3fcc6567 Mon Sep 17 00:00:00 2001 From: Janek Bevendorff Date: Sat, 3 Mar 2018 01:19:30 +0100 Subject: [PATCH 1/3] Process basic file, password and keyfile command line parameters Resolves #1358, resolves #1533, resolves #1600 --- src/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.cpp b/src/main.cpp index da71739c4..6a99f6e2d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -149,6 +149,7 @@ int main(int argc, char** argv) static QTextStream in(stdin, QIODevice::ReadOnly); password = in.readLine(); } + mainWindow.openDatabase(filename, password, parser.value(keyfileOption)); } } From a5dc1964a95ad296a4af7f6c3961499993e824a5 Mon Sep 17 00:00:00 2001 From: Janek Bevendorff Date: Sat, 3 Mar 2018 02:26:40 +0100 Subject: [PATCH 2/3] Resize details widget to minimum by default --- src/gui/DatabaseWidget.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/DatabaseWidget.cpp b/src/gui/DatabaseWidget.cpp index ff9d15fc0..e4ee21a3c 100644 --- a/src/gui/DatabaseWidget.cpp +++ b/src/gui/DatabaseWidget.cpp @@ -129,6 +129,7 @@ DatabaseWidget::DatabaseWidget(Database* db, QWidget* parent) m_detailSplitter->setStretchFactor(0, 100); m_detailSplitter->setStretchFactor(1, 0); + m_detailSplitter->setSizes({1, 1}); m_searchingLabel->setVisible(false); From 97a890e8a040418d3acf0f1b855c0ea184fe0e75 Mon Sep 17 00:00:00 2001 From: Michael Lass Date: Sat, 3 Mar 2018 11:10:55 +0100 Subject: [PATCH 3/3] Open previously opened databases in correct order Databases are re-opened by traversing LastOpenedDatabases from front to back, i.e. the last element in the list will be the active tab. However, the most-recently used database is currently stored at the beginning of the list. This leads to the least-recently used database to be the ative tab on next startup. Previously, this has been fixed in 4c76c97 by opening the databases in reversed order. This change was accidentally reverted in 165d664. Instead, change the order of LastOpenedDatabases itself, so no reversal on opening the databases is necessary. Resolves #1572 --- src/gui/MainWindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index 76f1ffb60..7f732faca 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -933,7 +933,7 @@ void MainWindow::setShortcut(QAction* action, QKeySequence::StandardKey standard void MainWindow::rememberOpenDatabases(const QString& filePath) { - m_openDatabases.append(filePath); + m_openDatabases.prepend(filePath); } void MainWindow::applySettingsChanges() @@ -1150,4 +1150,4 @@ void MainWindow::closeAllDatabases() void MainWindow::lockAllDatabases() { lockDatabasesAfterInactivity(); -} \ No newline at end of file +}