mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +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
|
||||
*/
|
||||
QString CValueObject::propertyByIndexAsString(int /** index **/, bool /** i18n **/) const
|
||||
QString CValueObject::propertyByIndexAsString(int index, bool i18n) const
|
||||
{
|
||||
// not all classes have to implement this
|
||||
qFatal("Property by index as string not implemented");
|
||||
return QString("boom"); // avoid compiler warning
|
||||
// default implementation, requires propertyByIndex
|
||||
QVariant qv = this->propertyByIndex(index);
|
||||
return BlackMisc::qVariantToString(qv, i18n);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user