mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Turn two for loops into Q_FOREACH.
This commit is contained in:
parent
4b3bee6400
commit
701013baab
@ -213,12 +213,12 @@ QMimeData* EntryModel::mimeData(const QModelIndexList& indexes) const
|
||||
|
||||
QSet<Entry*> seenEntries;
|
||||
|
||||
for (int i = 0; i < indexes.size(); i++) {
|
||||
if (!indexes[i].isValid()) {
|
||||
Q_FOREACH (const QModelIndex& index, indexes) {
|
||||
if (!index.isValid()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Entry* entry = entryFromIndex(indexes[i]);
|
||||
Entry* entry = entryFromIndex(index);
|
||||
if (!seenEntries.contains(entry)) {
|
||||
// make sure we don't add entries multiple times when we get indexes
|
||||
// with the same row but different columns
|
||||
|
@ -299,12 +299,12 @@ QMimeData* GroupModel::mimeData(const QModelIndexList& indexes) const
|
||||
|
||||
QSet<Group*> seenGroups;
|
||||
|
||||
for (int i = 0; i < indexes.size(); i++) {
|
||||
if (!indexes[i].isValid()) {
|
||||
Q_FOREACH (const QModelIndex& index, indexes) {
|
||||
if (!index.isValid()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Group* group = groupFromIndex(indexes[i]);
|
||||
Group* group = groupFromIndex(index);
|
||||
if (!seenGroups.contains(group)) {
|
||||
// make sure we don't add groups multiple times when we get indexes
|
||||
// with the same row but different columns
|
||||
|
Loading…
Reference in New Issue
Block a user