mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Allow EntryModel to be used with entries from different databases.
This commit is contained in:
parent
39b9260719
commit
34ad5d61f6
@ -76,8 +76,14 @@ void EntryModel::setEntryList(const QList<Entry*>& entries)
|
|||||||
m_entries = entries;
|
m_entries = entries;
|
||||||
m_orgEntries = entries;
|
m_orgEntries = entries;
|
||||||
|
|
||||||
if (entries.count() > 0) {
|
QSet<Database*> databases;
|
||||||
m_allGroups = entries.at(0)->group()->database()->rootGroup()->groupsRecursive(true);
|
|
||||||
|
Q_FOREACH (Entry* entry, m_entries) {
|
||||||
|
databases.insert(entry->group()->database());
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_FOREACH (Database* db, databases) {
|
||||||
|
m_allGroups.append(db->rootGroup()->groupsRecursive(true));
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_FOREACH (const Group* group, m_allGroups) {
|
Q_FOREACH (const Group* group, m_allGroups) {
|
||||||
|
Loading…
Reference in New Issue
Block a user