Added a default implementation for propertyByIndexAsString

in CValueObject
This commit is contained in:
Klaus Basan
2014-01-22 17:33:50 +01:00
parent 4ceb7367f9
commit 2307a2b642

View File

@@ -60,11 +60,11 @@ namespace BlackMisc
/* /*
* By index as string * By index as string
*/ */
QString CValueObject::propertyByIndexAsString(int /** index **/, bool /** i18n **/) const QString CValueObject::propertyByIndexAsString(int index, bool i18n) const
{ {
// not all classes have to implement this // default implementation, requires propertyByIndex
qFatal("Property by index as string not implemented"); QVariant qv = this->propertyByIndex(index);
return QString("boom"); // avoid compiler warning return BlackMisc::qVariantToString(qv, i18n);
} }
/* /*