From 2307a2b6421d1c541f461a4b1f7c76ca4aa7c8cf Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Wed, 22 Jan 2014 17:33:50 +0100 Subject: [PATCH] Added a default implementation for propertyByIndexAsString in CValueObject --- src/blackmisc/valueobject.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/blackmisc/valueobject.cpp b/src/blackmisc/valueobject.cpp index 47a4b2a36..6683177b1 100644 --- a/src/blackmisc/valueobject.cpp +++ b/src/blackmisc/valueobject.cpp @@ -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); } /*