mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Auto-Type: Only match non-empty associations
Previously empty associations matched any window but since you can use a wildcard (*) if you specifically want that this change makes it possible to define multiple sequences for the global search if you need to. Additionally show empty associations in the list as "(empty)" to better differentiate between rows if no title is set.
This commit is contained in:
parent
86ba58da06
commit
5927821896
@ -656,6 +656,10 @@
|
||||
<source>Default sequence</source>
|
||||
<translation>Default sequence</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>(empty)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AutoTypeMatchModel</name>
|
||||
|
@ -328,7 +328,7 @@ QList<QString> Entry::autoTypeSequences(const QString& windowTitle) const
|
||||
const auto assocList = autoTypeAssociations()->getAll();
|
||||
for (const auto& assoc : assocList) {
|
||||
auto window = resolveMultiplePlaceholders(assoc.window);
|
||||
if (windowMatches(window)) {
|
||||
if (!assoc.window.isEmpty() && windowMatches(window)) {
|
||||
if (!assoc.sequence.isEmpty()) {
|
||||
sequenceList << assoc.sequence;
|
||||
} else {
|
||||
|
@ -92,6 +92,9 @@ QVariant AutoTypeAssociationsModel::data(const QModelIndex& index, int role) con
|
||||
if (role == Qt::DisplayRole) {
|
||||
if (index.column() == 0) {
|
||||
QString window = m_autoTypeAssociations->get(index.row()).window;
|
||||
if (window.isEmpty()) {
|
||||
return tr("(empty)");
|
||||
}
|
||||
if (m_entry) {
|
||||
window = m_entry->maskPasswordPlaceholders(window);
|
||||
window = m_entry->resolveMultiplePlaceholders(window);
|
||||
|
Loading…
Reference in New Issue
Block a user