refs #655, Change signature (order) of setProperty/compareProperty

This commit is contained in:
Klaus Basan
2016-05-09 23:15:39 +02:00
committed by Roland Winklmeier
parent 49094115b1
commit 0f5d2a29a8
114 changed files with 324 additions and 331 deletions

View File

@@ -369,7 +369,7 @@ namespace BlackMisc
}
template <class MU, class PQ>
void CPhysicalQuantity<MU, PQ>::setPropertyByIndex(const CVariant &variant, const CPropertyIndex &index)
void CPhysicalQuantity<MU, PQ>::setPropertyByIndex(const CPropertyIndex &index, const CVariant &variant)
{
if (index.isMyself()) { (*this) = variant.to<PQ>(); return; }
ColumnIndex i = index.frontCasted<ColumnIndex>();
@@ -389,13 +389,13 @@ namespace BlackMisc
this->parseFromString(variant.toQString());
break;
default:
Mixin::Index<PQ>::setPropertyByIndex(variant, index);
Mixin::Index<PQ>::setPropertyByIndex(index, variant);
break;
}
}
template <class MU, class PQ>
int CPhysicalQuantity<MU, PQ>::comparePropertyByIndex(const PQ &pq, const CPropertyIndex &index) const
int CPhysicalQuantity<MU, PQ>::comparePropertyByIndex(const CPropertyIndex &index, const PQ &pq) const
{
if (index.isMyself()) { return compareImpl(*derived(), pq); }
ColumnIndex i = index.frontCasted<ColumnIndex>();

View File

@@ -208,10 +208,10 @@ namespace BlackMisc
CVariant propertyByIndex(const BlackMisc::CPropertyIndex &index) const;
//! \copydoc BlackMisc::Mixin::Index::setPropertyByIndex
void setPropertyByIndex(const CVariant &variant, const BlackMisc::CPropertyIndex &index);
void setPropertyByIndex(const BlackMisc::CPropertyIndex &index, const CVariant &variant);
//! Compare
int comparePropertyByIndex(const PQ &pq, const CPropertyIndex &index) const;
int comparePropertyByIndex(const CPropertyIndex &index, const PQ &pq) const;
//! \copydoc BlackMisc::Mixin::String::toQString
QString convertToQString(bool i18n = false) const;