mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-02-23 07:59:54 -05:00
Implement some const methods properly.
This commit is contained in:
parent
3193adc215
commit
82cb315977
@ -248,14 +248,9 @@ QList<Group*> Group::children()
|
|||||||
return m_children;
|
return m_children;
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<const Group*> Group::children() const
|
const QList<Group*>& Group::children() const
|
||||||
{
|
{
|
||||||
QList<const Group*> constChildren;
|
return m_children;
|
||||||
Q_FOREACH (Group* group, m_children) {
|
|
||||||
constChildren << group;
|
|
||||||
}
|
|
||||||
|
|
||||||
return constChildren;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<Entry*> Group::entries()
|
QList<Entry*> Group::entries()
|
||||||
@ -263,14 +258,9 @@ QList<Entry*> Group::entries()
|
|||||||
return m_entries;
|
return m_entries;
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<const Entry*> Group::entries() const
|
const QList<Entry*>& Group::entries() const
|
||||||
{
|
{
|
||||||
QList<const Entry*> constEntries;
|
return m_entries;
|
||||||
Q_FOREACH (Entry* entry, m_entries) {
|
|
||||||
constEntries << entry;
|
|
||||||
}
|
|
||||||
|
|
||||||
return constEntries;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Group::addEntry(Entry *entry)
|
void Group::addEntry(Entry *entry)
|
||||||
|
@ -65,9 +65,9 @@ public:
|
|||||||
|
|
||||||
const Database* database() const;
|
const Database* database() const;
|
||||||
QList<Group*> children();
|
QList<Group*> children();
|
||||||
QList<const Group*> children() const;
|
const QList<Group*>& children() const;
|
||||||
QList<Entry*> entries();
|
QList<Entry*> entries();
|
||||||
QList<const Entry*> entries() const;
|
const QList<Entry*>& entries() const;
|
||||||
void addEntry(Entry* entry);
|
void addEntry(Entry* entry);
|
||||||
void removeEntry(Entry* entry);
|
void removeEntry(Entry* entry);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user