refs #413, #416 Implemented base_type fallthrough in Mixin::Index so it can be used by more classes.

(cherry picked from commit d97775a232b007061cbfa85b451b0be569127696)
This commit is contained in:
Mathew Sutcliffe
2015-05-08 20:19:54 +01:00
parent 84800c190a
commit dfe42e1ce7
4 changed files with 69 additions and 17 deletions

View File

@@ -371,7 +371,7 @@ namespace BlackMisc
case IndexValueRounded6DigitsWithUnit:
return CVariant::from(this->valueRoundedWithUnit(6));
default:
return Mixin::Index<CPhysicalQuantity<MU, PQ>>::propertyByIndex(index);
return Mixin::Index<PQ>::propertyByIndex(index);
}
}
@@ -400,7 +400,7 @@ namespace BlackMisc
this->parseFromString(variant.toQString());
break;
default:
Mixin::Index<CPhysicalQuantity<MU, PQ>>::setPropertyByIndex(variant, index);
Mixin::Index<PQ>::setPropertyByIndex(variant, index);
break;
}
}

View File

@@ -45,7 +45,7 @@ namespace BlackMisc
template <class MU, class PQ> class CPhysicalQuantity :
public Mixin::DBusOperators<CPhysicalQuantity<MU, PQ>>,
public Mixin::JsonOperators<CPhysicalQuantity<MU, PQ>>,
public Mixin::Index<CPhysicalQuantity<MU, PQ>>,
public Mixin::Index<PQ>,
public Mixin::MetaTypeAndQList<PQ>,
public Mixin::String<PQ>,
public Mixin::Icon<CPhysicalQuantity<MU, PQ>>