mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-11-22 16:00:38 -05:00
Added history limits enforcement
This commit is contained in:
parent
860a2131b3
commit
8c87a87da6
6 changed files with 63 additions and 1 deletions
|
|
@ -36,6 +36,11 @@ QString EntryAttributes::value(const QString& key) const
|
|||
return m_attributes.value(key);
|
||||
}
|
||||
|
||||
int EntryAttributes::valueSize(const QString& key)
|
||||
{
|
||||
return m_attributes.value(key).size() * sizeof(QChar);
|
||||
}
|
||||
|
||||
bool EntryAttributes::isProtected(const QString& key) const
|
||||
{
|
||||
return m_protectedAttributes.contains(key);
|
||||
|
|
@ -223,6 +228,15 @@ void EntryAttributes::clear()
|
|||
Q_EMIT modified();
|
||||
}
|
||||
|
||||
int EntryAttributes::attributesSize() {
|
||||
int size = 0;
|
||||
|
||||
Q_FOREACH (const QString& key, keys()) {
|
||||
size += valueSize(key);
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
bool EntryAttributes::isDefaultAttribute(const QString& key)
|
||||
{
|
||||
return DEFAULT_ATTRIBUTES.contains(key);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue