mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-19 20:25:29 +08:00
Added a default implementation for propertyByIndexAsString
in CValueObject
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user