MCPcopy Create free account
hub / github.com/KDAB/KDChart / compareHeaderDataMaps

Method compareHeaderDataMaps

src/KDChart/KDChartAttributesModel.cpp:81–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81bool 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
107bool AttributesModel::compare(const AttributesModel *other) const
108{

Callers

nothing calls this directly

Calls 1

valueMethod · 0.80

Tested by

no test coverage detected