mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-29 01:28:47 -04:00
Add option to not show password placeholder when field is empty (#2333)
* Add option to not show password placeholder when field is empty * Set the option to show an empty passwd field instead of dots to true by default
This commit is contained in:
parent
a4c6529d60
commit
b40e5686dc
5 changed files with 26 additions and 13 deletions
|
@ -34,6 +34,7 @@ lockdatabaseidlesec=240
|
||||||
lockdatabaseminimize=false
|
lockdatabaseminimize=false
|
||||||
lockdatabasescreenlock=true
|
lockdatabasescreenlock=true
|
||||||
passwordscleartext=false
|
passwordscleartext=false
|
||||||
|
passwordemptynodots=true
|
||||||
passwordsrepeat=false
|
passwordsrepeat=false
|
||||||
|
|
||||||
[Http]
|
[Http]
|
||||||
|
|
|
@ -146,6 +146,7 @@ void Config::init(const QString& fileName)
|
||||||
m_defaults.insert("security/lockdatabasescreenlock", true);
|
m_defaults.insert("security/lockdatabasescreenlock", true);
|
||||||
m_defaults.insert("security/passwordsrepeat", false);
|
m_defaults.insert("security/passwordsrepeat", false);
|
||||||
m_defaults.insert("security/passwordscleartext", false);
|
m_defaults.insert("security/passwordscleartext", false);
|
||||||
|
m_defaults.insert("security/passwordemptynodots", true);
|
||||||
m_defaults.insert("security/hidepassworddetails", true);
|
m_defaults.insert("security/hidepassworddetails", true);
|
||||||
m_defaults.insert("security/autotypeask", true);
|
m_defaults.insert("security/autotypeask", true);
|
||||||
m_defaults.insert("security/IconDownloadFallback", false);
|
m_defaults.insert("security/IconDownloadFallback", false);
|
||||||
|
|
|
@ -88,10 +88,7 @@ ApplicationSettingsWidget::ApplicationSettingsWidget(QWidget* parent)
|
||||||
m_secUi->lockDatabaseIdleSpinBox,
|
m_secUi->lockDatabaseIdleSpinBox,
|
||||||
SLOT(setEnabled(bool)));
|
SLOT(setEnabled(bool)));
|
||||||
|
|
||||||
connect(m_secUi->touchIDResetCheckBox,
|
connect(m_secUi->touchIDResetCheckBox, SIGNAL(toggled(bool)), m_secUi->touchIDResetSpinBox, SLOT(setEnabled(bool)));
|
||||||
SIGNAL(toggled(bool)),
|
|
||||||
m_secUi->touchIDResetSpinBox,
|
|
||||||
SLOT(setEnabled(bool)));
|
|
||||||
|
|
||||||
#ifndef WITH_XC_NETWORKING
|
#ifndef WITH_XC_NETWORKING
|
||||||
m_secUi->privacy->setVisible(false);
|
m_secUi->privacy->setVisible(false);
|
||||||
|
@ -189,6 +186,7 @@ void ApplicationSettingsWidget::loadSettings()
|
||||||
m_secUi->fallbackToSearch->setChecked(config()->get("security/IconDownloadFallback").toBool());
|
m_secUi->fallbackToSearch->setChecked(config()->get("security/IconDownloadFallback").toBool());
|
||||||
|
|
||||||
m_secUi->passwordCleartextCheckBox->setChecked(config()->get("security/passwordscleartext").toBool());
|
m_secUi->passwordCleartextCheckBox->setChecked(config()->get("security/passwordscleartext").toBool());
|
||||||
|
m_secUi->passwordShowDotsCheckBox->setChecked(config()->get("security/passwordemptynodots").toBool());
|
||||||
m_secUi->passwordDetailsCleartextCheckBox->setChecked(config()->get("security/hidepassworddetails").toBool());
|
m_secUi->passwordDetailsCleartextCheckBox->setChecked(config()->get("security/hidepassworddetails").toBool());
|
||||||
m_secUi->passwordRepeatCheckBox->setChecked(config()->get("security/passwordsrepeat").toBool());
|
m_secUi->passwordRepeatCheckBox->setChecked(config()->get("security/passwordsrepeat").toBool());
|
||||||
m_secUi->hideNotesCheckBox->setChecked(config()->get("security/hidenotes").toBool());
|
m_secUi->hideNotesCheckBox->setChecked(config()->get("security/hidenotes").toBool());
|
||||||
|
@ -259,6 +257,8 @@ void ApplicationSettingsWidget::saveSettings()
|
||||||
config()->set("security/IconDownloadFallback", m_secUi->fallbackToSearch->isChecked());
|
config()->set("security/IconDownloadFallback", m_secUi->fallbackToSearch->isChecked());
|
||||||
|
|
||||||
config()->set("security/passwordscleartext", m_secUi->passwordCleartextCheckBox->isChecked());
|
config()->set("security/passwordscleartext", m_secUi->passwordCleartextCheckBox->isChecked());
|
||||||
|
config()->set("security/passwordemptynodots", m_secUi->passwordShowDotsCheckBox->isChecked());
|
||||||
|
|
||||||
config()->set("security/hidepassworddetails", m_secUi->passwordDetailsCleartextCheckBox->isChecked());
|
config()->set("security/hidepassworddetails", m_secUi->passwordDetailsCleartextCheckBox->isChecked());
|
||||||
config()->set("security/passwordsrepeat", m_secUi->passwordRepeatCheckBox->isChecked());
|
config()->set("security/passwordsrepeat", m_secUi->passwordRepeatCheckBox->isChecked());
|
||||||
config()->set("security/hidenotes", m_secUi->hideNotesCheckBox->isChecked());
|
config()->set("security/hidenotes", m_secUi->hideNotesCheckBox->isChecked());
|
||||||
|
|
|
@ -179,6 +179,13 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="passwordShowDotsCheckBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Don't use placeholder for empty password fields</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="passwordDetailsCleartextCheckBox">
|
<widget class="QCheckBox" name="passwordDetailsCleartextCheckBox">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QPalette>
|
#include <QPalette>
|
||||||
|
|
||||||
|
#include "core/Config.h"
|
||||||
#include "core/DatabaseIcons.h"
|
#include "core/DatabaseIcons.h"
|
||||||
#include "core/Entry.h"
|
#include "core/Entry.h"
|
||||||
#include "core/Global.h"
|
#include "core/Global.h"
|
||||||
|
@ -172,6 +173,9 @@ QVariant EntryModel::data(const QModelIndex& index, int role) const
|
||||||
if (attr->isReference(EntryAttributes::PasswordKey)) {
|
if (attr->isReference(EntryAttributes::PasswordKey)) {
|
||||||
result.prepend(tr("Ref: ", "Reference abbreviation"));
|
result.prepend(tr("Ref: ", "Reference abbreviation"));
|
||||||
}
|
}
|
||||||
|
if (entry->password().isEmpty() && config()->get("security/passwordemptynodots").toBool()) {
|
||||||
|
result = "";
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
case Url:
|
case Url:
|
||||||
result = entry->resolveMultiplePlaceholders(entry->displayUrl());
|
result = entry->resolveMultiplePlaceholders(entry->displayUrl());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue