refs #116 using CVariant in the implementation of CIndexVariantMap

This commit is contained in:
Mathew Sutcliffe
2014-05-19 23:15:05 +01:00
parent 8f2c733f47
commit c6e9301078
3 changed files with 18 additions and 40 deletions

View File

@@ -115,7 +115,7 @@ namespace BlackMisc
const auto &map = indexMap.map();
for (auto it = map.begin(); it != map.end(); ++it)
{
this->setPropertyByIndex(it.value(), it.key());
this->setPropertyByIndex(it.value().toQVariant(), it.key());
}
return c;
}
@@ -131,7 +131,7 @@ namespace BlackMisc
{
// QVariant cannot be compared directly
QVariant p = valueObject.propertyByIndex(it.key()); // from value object
QVariant v = it.value(); // from map
QVariant v = it.value().toQVariant(); // from map
if (!BlackMisc::equalQVariants(p, v)) return false;
}
return true;