mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-02-22 07:29:52 -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;
|
||||
}
|
||||
|
||||
QList<const Group*> Group::children() const
|
||||
const QList<Group*>& Group::children() const
|
||||
{
|
||||
QList<const Group*> constChildren;
|
||||
Q_FOREACH (Group* group, m_children) {
|
||||
constChildren << group;
|
||||
}
|
||||
|
||||
return constChildren;
|
||||
return m_children;
|
||||
}
|
||||
|
||||
QList<Entry*> Group::entries()
|
||||
@ -263,14 +258,9 @@ QList<Entry*> Group::entries()
|
||||
return m_entries;
|
||||
}
|
||||
|
||||
QList<const Entry*> Group::entries() const
|
||||
const QList<Entry*>& Group::entries() const
|
||||
{
|
||||
QList<const Entry*> constEntries;
|
||||
Q_FOREACH (Entry* entry, m_entries) {
|
||||
constEntries << entry;
|
||||
}
|
||||
|
||||
return constEntries;
|
||||
return m_entries;
|
||||
}
|
||||
|
||||
void Group::addEntry(Entry *entry)
|
||||
|
@ -65,9 +65,9 @@ public:
|
||||
|
||||
const Database* database() const;
|
||||
QList<Group*> children();
|
||||
QList<const Group*> children() const;
|
||||
const QList<Group*>& children() const;
|
||||
QList<Entry*> entries();
|
||||
QList<const Entry*> entries() const;
|
||||
const QList<Entry*>& entries() const;
|
||||
void addEntry(Entry* entry);
|
||||
void removeEntry(Entry* entry);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user