mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-04 12:34:22 -04: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:
parent
5e68cd2fa2
commit
746276edea
13 changed files with 92 additions and 107 deletions
|
@ -224,11 +224,6 @@ void EditGroupWidgetKeeShare::launchPathSelectionDialog()
|
|||
if (!m_temporaryGroup) {
|
||||
return;
|
||||
}
|
||||
QString defaultDirPath = config()->get(Config::KeeShare_LastShareDir).toString();
|
||||
const bool dirExists = !defaultDirPath.isEmpty() && QDir(defaultDirPath).exists();
|
||||
if (!dirExists) {
|
||||
defaultDirPath = QStandardPaths::standardLocations(QStandardPaths::DocumentsLocation).first();
|
||||
}
|
||||
auto reference = KeeShare::referenceOf(m_temporaryGroup);
|
||||
QString defaultFiletype = "";
|
||||
auto supportedExtensions = QStringList();
|
||||
|
@ -252,6 +247,7 @@ void EditGroupWidgetKeeShare::launchPathSelectionDialog()
|
|||
#endif
|
||||
|
||||
const auto filters = knownFilters.join(";;");
|
||||
auto defaultDirPath = FileDialog::getLastDir("keeshare");
|
||||
auto filename = reference.path;
|
||||
if (filename.isEmpty()) {
|
||||
filename = m_temporaryGroup->name();
|
||||
|
@ -285,7 +281,7 @@ void EditGroupWidgetKeeShare::launchPathSelectionDialog()
|
|||
|
||||
m_ui->pathEdit->setText(filename);
|
||||
selectPath();
|
||||
config()->set(Config::KeeShare_LastShareDir, QFileInfo(filename).absolutePath());
|
||||
FileDialog::saveLastDir("keeshare", filename);
|
||||
|
||||
updateSharingState();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue