mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-02-05 01:15:33 -05:00
Allow hiding expired entries from Auto-Type
* Add setting to hide expired entries from Auto-Type * Expired entries will not be shown in selection dialogs or be auto-picked for use * Fixes #1855
This commit is contained in:
parent
5c2a1a4284
commit
745f1befe9
@ -337,10 +337,14 @@ void AutoType::performGlobalAutoType(const QList<QSharedPointer<Database>>& dbLi
|
|||||||
}
|
}
|
||||||
|
|
||||||
QList<AutoTypeMatch> matchList;
|
QList<AutoTypeMatch> matchList;
|
||||||
|
bool hideExpired = config()->get(Config::AutoTypeHideExpiredEntry).toBool();
|
||||||
|
|
||||||
for (const auto& db : dbList) {
|
for (const auto& db : dbList) {
|
||||||
const QList<Entry*> dbEntries = db->rootGroup()->entriesRecursive();
|
const QList<Entry*> dbEntries = db->rootGroup()->entriesRecursive();
|
||||||
for (Entry* entry : dbEntries) {
|
for (Entry* entry : dbEntries) {
|
||||||
|
if (hideExpired && entry->isExpired()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
const QSet<QString> sequences = autoTypeSequences(entry, m_windowTitleForGlobal).toSet();
|
const QSet<QString> sequences = autoTypeSequences(entry, m_windowTitleForGlobal).toSet();
|
||||||
for (const QString& sequence : sequences) {
|
for (const QString& sequence : sequences) {
|
||||||
if (!sequence.isEmpty()) {
|
if (!sequence.isEmpty()) {
|
||||||
|
@ -72,6 +72,7 @@ static const QHash<Config::ConfigKey, ConfigDirective> configStrings = {
|
|||||||
{Config::AutoTypeEntryURLMatch,{QS("AutoTypeEntryURLMatch"), Roaming, true}},
|
{Config::AutoTypeEntryURLMatch,{QS("AutoTypeEntryURLMatch"), Roaming, true}},
|
||||||
{Config::AutoTypeDelay,{QS("AutoTypeDelay"), Roaming, 25}},
|
{Config::AutoTypeDelay,{QS("AutoTypeDelay"), Roaming, 25}},
|
||||||
{Config::AutoTypeStartDelay,{QS("AutoTypeStartDelay"), Roaming, 500}},
|
{Config::AutoTypeStartDelay,{QS("AutoTypeStartDelay"), Roaming, 500}},
|
||||||
|
{Config::AutoTypeHideExpiredEntry,{QS("AutoTypeHideExpiredEntry"), Roaming, false}},
|
||||||
{Config::GlobalAutoTypeKey,{QS("GlobalAutoTypeKey"), Roaming, 0}},
|
{Config::GlobalAutoTypeKey,{QS("GlobalAutoTypeKey"), Roaming, 0}},
|
||||||
{Config::GlobalAutoTypeModifiers,{QS("GlobalAutoTypeModifiers"), Roaming, 0}},
|
{Config::GlobalAutoTypeModifiers,{QS("GlobalAutoTypeModifiers"), Roaming, 0}},
|
||||||
{Config::FaviconDownloadTimeout,{QS("FaviconDownloadTimeout"), Roaming, 10}},
|
{Config::FaviconDownloadTimeout,{QS("FaviconDownloadTimeout"), Roaming, 10}},
|
||||||
|
@ -56,6 +56,7 @@ public:
|
|||||||
AutoTypeEntryURLMatch,
|
AutoTypeEntryURLMatch,
|
||||||
AutoTypeDelay,
|
AutoTypeDelay,
|
||||||
AutoTypeStartDelay,
|
AutoTypeStartDelay,
|
||||||
|
AutoTypeHideExpiredEntry,
|
||||||
GlobalAutoTypeKey,
|
GlobalAutoTypeKey,
|
||||||
GlobalAutoTypeModifiers,
|
GlobalAutoTypeModifiers,
|
||||||
FaviconDownloadTimeout,
|
FaviconDownloadTimeout,
|
||||||
|
@ -198,6 +198,7 @@ void ApplicationSettingsWidget::loadSettings()
|
|||||||
config()->get(Config::UseGroupIconOnEntryCreation).toBool());
|
config()->get(Config::UseGroupIconOnEntryCreation).toBool());
|
||||||
m_generalUi->autoTypeEntryTitleMatchCheckBox->setChecked(config()->get(Config::AutoTypeEntryTitleMatch).toBool());
|
m_generalUi->autoTypeEntryTitleMatchCheckBox->setChecked(config()->get(Config::AutoTypeEntryTitleMatch).toBool());
|
||||||
m_generalUi->autoTypeEntryURLMatchCheckBox->setChecked(config()->get(Config::AutoTypeEntryURLMatch).toBool());
|
m_generalUi->autoTypeEntryURLMatchCheckBox->setChecked(config()->get(Config::AutoTypeEntryURLMatch).toBool());
|
||||||
|
m_generalUi->autoTypeHideExpiredEntryCheckBox->setChecked(config()->get(Config::AutoTypeHideExpiredEntry).toBool());
|
||||||
m_generalUi->faviconTimeoutSpinBox->setValue(config()->get(Config::FaviconDownloadTimeout).toInt());
|
m_generalUi->faviconTimeoutSpinBox->setValue(config()->get(Config::FaviconDownloadTimeout).toInt());
|
||||||
|
|
||||||
m_generalUi->languageComboBox->clear();
|
m_generalUi->languageComboBox->clear();
|
||||||
@ -324,6 +325,7 @@ void ApplicationSettingsWidget::saveSettings()
|
|||||||
config()->set(Config::UseGroupIconOnEntryCreation, m_generalUi->useGroupIconOnEntryCreationCheckBox->isChecked());
|
config()->set(Config::UseGroupIconOnEntryCreation, m_generalUi->useGroupIconOnEntryCreationCheckBox->isChecked());
|
||||||
config()->set(Config::AutoTypeEntryTitleMatch, m_generalUi->autoTypeEntryTitleMatchCheckBox->isChecked());
|
config()->set(Config::AutoTypeEntryTitleMatch, m_generalUi->autoTypeEntryTitleMatchCheckBox->isChecked());
|
||||||
config()->set(Config::AutoTypeEntryURLMatch, m_generalUi->autoTypeEntryURLMatchCheckBox->isChecked());
|
config()->set(Config::AutoTypeEntryURLMatch, m_generalUi->autoTypeEntryURLMatchCheckBox->isChecked());
|
||||||
|
config()->set(Config::AutoTypeHideExpiredEntry, m_generalUi->autoTypeHideExpiredEntryCheckBox->isChecked());
|
||||||
config()->set(Config::FaviconDownloadTimeout, m_generalUi->faviconTimeoutSpinBox->value());
|
config()->set(Config::FaviconDownloadTimeout, m_generalUi->faviconTimeoutSpinBox->value());
|
||||||
|
|
||||||
auto language = m_generalUi->languageComboBox->currentData().toString();
|
auto language = m_generalUi->languageComboBox->currentData().toString();
|
||||||
|
@ -850,6 +850,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="autoTypeHideExpiredEntryCheckBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Hide expired entries from Auto-Type</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer_4">
|
<spacer name="verticalSpacer_4">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user