Support KeePass format 3.00 (used by KeePass2 >= 2.15).

Closes #6

Attachments are now stored in a pool under Metadata instead of in entries.
The protected flag of attachments isn't supported anymore.
New metadata attributes: color, historyMaxItems and historyMaxSize.
Dropped metadata attribute: autoEnableVisualHiding.
This commit is contained in:
Felix Geyer
2012-04-21 16:45:46 +02:00
parent e8ac70120b
commit 8acd6f74d8
23 changed files with 376 additions and 81 deletions

View File

@@ -305,6 +305,25 @@ const QList<Entry*>& Group::entries() const
return m_entries;
}
QList<Entry*> Group::entriesRecursive(bool includeHistoryItems)
{
QList<Entry*> entryList;
entryList.append(m_entries);
if (includeHistoryItems) {
Q_FOREACH (Entry* entry, m_entries) {
entryList.append(entry->historyItems());
}
}
Q_FOREACH (Group* group, m_children) {
entryList.append(group->entriesRecursive(includeHistoryItems));
}
return entryList;
}
void Group::addEntry(Entry *entry)
{
Q_ASSERT(entry);