mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 18:25:37 +08:00
Ref T424, PQ strings without (thousand) separators
* separator can cause issue when sending data (WebService, FSD) * re-parsing (print and parse again) can cause to undesired results as the separator is mistaken as decimal separator with a different locale * separator now a parameter so it can still be used
This commit is contained in:
@@ -41,9 +41,9 @@ namespace BlackMisc
|
||||
void CAccelerationUnit::anchor()
|
||||
{ }
|
||||
|
||||
QString CAngleUnit::makeRoundedQStringWithUnit(double value, int digits, bool i18n) const
|
||||
QString CAngleUnit::makeRoundedQStringWithUnit(double value, int digits, bool withGroupSeparator, bool i18n) const
|
||||
{
|
||||
if (digits < 0) digits = this->getDisplayDigits();
|
||||
if (digits < 0) { digits = this->getDisplayDigits(); }
|
||||
QString s;
|
||||
if ((*this) == CAngleUnit::sexagesimalDeg())
|
||||
{
|
||||
@@ -68,14 +68,14 @@ namespace BlackMisc
|
||||
}
|
||||
else
|
||||
{
|
||||
s = this->CMeasurementUnit::makeRoundedQStringWithUnit(value, digits, i18n);
|
||||
s = this->CMeasurementUnit::makeRoundedQStringWithUnit(value, digits, withGroupSeparator, i18n);
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
QString CTimeUnit::makeRoundedQStringWithUnit(double value, int digits, bool i18n) const
|
||||
QString CTimeUnit::makeRoundedQStringWithUnit(double value, int digits, bool withGroupSeparator, bool i18n) const
|
||||
{
|
||||
if (digits < 0) digits = this->getDisplayDigits();
|
||||
if (digits < 0) { digits = this->getDisplayDigits(); }
|
||||
QString s;
|
||||
if ((*this) == CTimeUnit::hms())
|
||||
{
|
||||
@@ -110,7 +110,7 @@ namespace BlackMisc
|
||||
}
|
||||
else
|
||||
{
|
||||
s = this->CMeasurementUnit::makeRoundedQStringWithUnit(value, digits, i18n);
|
||||
s = this->CMeasurementUnit::makeRoundedQStringWithUnit(value, digits, withGroupSeparator, i18n);
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user