Include groups in custom icon delete check.

Refs #22
This commit is contained in:
Florian Geyer 2012-05-12 01:51:41 +02:00
parent e4b6289c0b
commit 4807ec3368
3 changed files with 34 additions and 10 deletions

View file

@ -378,6 +378,20 @@ QList<Entry*> Group::entriesRecursive(bool includeHistoryItems) const
return entryList;
}
QList<const Group*> Group::groupsRecursive(bool includeSelf) const
{
QList<const Group*> groupList;
if (includeSelf) {
groupList.append(this);
}
Q_FOREACH (Group* group, m_children) {
groupList.append(group->groupsRecursive(true));
}
return groupList;
}
void Group::addEntry(Entry* entry)
{
Q_ASSERT(entry);