mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Add AutoTypeAssociations::removeEmpty().
This commit is contained in:
parent
7abaf0e215
commit
7db6850528
@ -64,6 +64,17 @@ void AutoTypeAssociations::remove(int index)
|
|||||||
Q_EMIT modified();
|
Q_EMIT modified();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AutoTypeAssociations::removeEmpty()
|
||||||
|
{
|
||||||
|
QMutableListIterator<AutoTypeAssociations::Association> i(m_associations);
|
||||||
|
while (i.hasNext()) {
|
||||||
|
const Association& assoc = i.next();
|
||||||
|
if (assoc.window.isEmpty() && assoc.sequence.isEmpty()) {
|
||||||
|
i.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void AutoTypeAssociations::update(int index, const AutoTypeAssociations::Association& association)
|
void AutoTypeAssociations::update(int index, const AutoTypeAssociations::Association& association)
|
||||||
{
|
{
|
||||||
Q_ASSERT(index >= 0 && index < m_associations.size());
|
Q_ASSERT(index >= 0 && index < m_associations.size());
|
||||||
|
@ -40,6 +40,7 @@ public:
|
|||||||
void copyDataFrom(const AutoTypeAssociations* other);
|
void copyDataFrom(const AutoTypeAssociations* other);
|
||||||
void add(const AutoTypeAssociations::Association& association);
|
void add(const AutoTypeAssociations::Association& association);
|
||||||
void remove(int index);
|
void remove(int index);
|
||||||
|
void removeEmpty();
|
||||||
void update(int index, const AutoTypeAssociations::Association& association);
|
void update(int index, const AutoTypeAssociations::Association& association);
|
||||||
AutoTypeAssociations::Association get(int index) const;
|
AutoTypeAssociations::Association get(int index) const;
|
||||||
QList<AutoTypeAssociations::Association> getAll() const;
|
QList<AutoTypeAssociations::Association> getAll() const;
|
||||||
|
Loading…
Reference in New Issue
Block a user