mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-04 15:39:34 +01:00
Enhance last used directory settings
* Use hash based storage for last used directories instead of a key/value for each type * Explicitly declare certain operations as sensitive and follow the "Remember Last Database" setting for those. * Introduce database backup directory location (close #6619)
This commit is contained in:
@@ -26,7 +26,6 @@
|
||||
|
||||
#include <QColorDialog>
|
||||
#include <QDesktopServices>
|
||||
#include <QFileDialog>
|
||||
#include <QSortFilterProxyModel>
|
||||
#include <QStringListModel>
|
||||
|
||||
@@ -50,6 +49,7 @@
|
||||
#include "gui/Clipboard.h"
|
||||
#include "gui/EditWidgetIcons.h"
|
||||
#include "gui/EditWidgetProperties.h"
|
||||
#include "gui/FileDialog.h"
|
||||
#include "gui/Font.h"
|
||||
#include "gui/Icons.h"
|
||||
#include "gui/MessageBox.h"
|
||||
@@ -677,8 +677,9 @@ void EditEntryWidget::toKeeAgentSettings(KeeAgentSettings& settings) const
|
||||
|
||||
void EditEntryWidget::browsePrivateKey()
|
||||
{
|
||||
QString fileName = QFileDialog::getOpenFileName(this, tr("Select private key"), "");
|
||||
auto fileName = fileDialog()->getOpenFileName(this, tr("Select private key"), FileDialog::getLastDir("sshagent"));
|
||||
if (!fileName.isEmpty()) {
|
||||
FileDialog::saveLastDir("sshagent", fileName);
|
||||
m_sshAgentUi->externalFileEdit->setText(fileName);
|
||||
m_sshAgentUi->externalFileRadioButton->setChecked(true);
|
||||
updateSSHAgentKeyInfo();
|
||||
|
||||
Reference in New Issue
Block a user