From 8043caab6ddfddd7bb8f4ffeef10f65eb586ec45 Mon Sep 17 00:00:00 2001 From: Mathew Sutcliffe Date: Wed, 9 Apr 2014 18:57:13 +0100 Subject: [PATCH] refs #197 stringification of null quantity should yield "undefined" --- src/blackmisc/pqphysicalquantity.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/blackmisc/pqphysicalquantity.cpp b/src/blackmisc/pqphysicalquantity.cpp index fd21f8aa5..db2207e08 100644 --- a/src/blackmisc/pqphysicalquantity.cpp +++ b/src/blackmisc/pqphysicalquantity.cpp @@ -266,7 +266,10 @@ namespace BlackMisc */ template QString CPhysicalQuantity::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); }