mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 21:15:33 +08:00
Formatter with improved NULL value handling
This commit is contained in:
@@ -352,7 +352,11 @@ namespace BlackGui
|
||||
//! Version if value is already available as PQ
|
||||
BlackMisc::CVariant displayRole(const PQ &pq) const
|
||||
{
|
||||
if (m_unit.isNull()) { return pq.valueRoundedWithUnit(m_digits, m_useI18n); }
|
||||
if (pq.isNull())
|
||||
{
|
||||
static const BlackMisc::CVariant null("null");
|
||||
return null;
|
||||
}
|
||||
return pq.valueRoundedWithUnit(m_unit, m_digits, m_useI18n);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user