mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-04 15:39:34 +01:00
Convert Q_FOREACH loops to C++11 for loops.
Q_FOREACH will de deprecated soon.
This commit is contained in:
committed by
Jonathan White
parent
ad834f0f58
commit
fff9e7ac46
@@ -91,13 +91,15 @@ Entry* Database::resolveEntry(const Uuid& uuid)
|
||||
|
||||
Entry* Database::recFindEntry(const Uuid& uuid, Group* group)
|
||||
{
|
||||
Q_FOREACH (Entry* entry, group->entries()) {
|
||||
const QList<Entry*> entryList = group->entries();
|
||||
for (Entry* entry : entryList) {
|
||||
if (entry->uuid() == uuid) {
|
||||
return entry;
|
||||
}
|
||||
}
|
||||
|
||||
Q_FOREACH (Group* child, group->children()) {
|
||||
const QList<Group*> children = group->children();
|
||||
for (Group* child : children) {
|
||||
Entry* result = recFindEntry(uuid, child);
|
||||
if (result) {
|
||||
return result;
|
||||
@@ -118,7 +120,8 @@ Group* Database::recFindGroup(const Uuid& uuid, Group* group)
|
||||
return group;
|
||||
}
|
||||
|
||||
Q_FOREACH (Group* child, group->children()) {
|
||||
const QList<Group*> children = group->children();
|
||||
for (Group* child : children) {
|
||||
Group* result = recFindGroup(uuid, child);
|
||||
if (result) {
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user