| 79 | } |
| 80 | |
| 81 | bool AttributesModel::compareHeaderDataMaps(const QMap<int, QMap<int, QVariant>> &mapA, |
| 82 | const QMap<int, QMap<int, QVariant>> &mapB) const |
| 83 | { |
| 84 | if (mapA.count() != mapB.count()) { |
| 85 | return false; |
| 86 | } |
| 87 | QMap<int, QMap<int, QVariant>>::const_iterator itA = mapA.constBegin(); |
| 88 | QMap<int, QMap<int, QVariant>>::const_iterator itB = mapB.constBegin(); |
| 89 | for (; itA != mapA.constEnd(); ++itA, ++itB) { |
| 90 | if (itA->count() != itB->count()) { |
| 91 | return false; |
| 92 | } |
| 93 | QMap<int, QVariant>::const_iterator it2A = itA->constBegin(); |
| 94 | QMap<int, QVariant>::const_iterator it2B = itB->constBegin(); |
| 95 | for (; it2A != itA->constEnd(); ++it2A, ++it2B) { |
| 96 | if (it2A.key() != it2B.key()) { |
| 97 | return false; |
| 98 | } |
| 99 | if (!compareAttributes(it2A.key(), it2A.value(), it2B.value())) { |
| 100 | return false; |
| 101 | } |
| 102 | } |
| 103 | } |
| 104 | return true; |
| 105 | } |
| 106 | |
| 107 | bool AttributesModel::compare(const AttributesModel *other) const |
| 108 | { |