refs #197 stringification of null quantity should yield "undefined"

This commit is contained in:
Mathew Sutcliffe
2014-04-09 18:57:13 +01:00
committed by Klaus Basan
parent a4e3ac6f40
commit 8043caab6d

View File

@@ -266,7 +266,10 @@ namespace BlackMisc
*/
template <class MU, class PQ> QString CPhysicalQuantity<MU, PQ>::convertToQString(bool i18n) const
{
if (this->isNull()) return (i18n) ? QCoreApplication::translate("CPhysicalQuantity", "undefined") : "undefined";
if (this->isNull())
{
return i18n ? QCoreApplication::translate("CPhysicalQuantity", "undefined") : "undefined";
}
return this->valueRoundedWithUnit(this->getUnit(), -1, i18n);
}