Ref T111, utility function for local decimal point

This commit is contained in:
Klaus Basan
2017-08-04 11:13:47 +02:00
committed by Mathew Sutcliffe
parent 9445bd56a3
commit bb13a32c7c
2 changed files with 8 additions and 0 deletions

View File

@@ -285,6 +285,11 @@ namespace BlackMisc
// SystemLocaleLongDate,
return QDateTime();
}
QString dotToLocaleDecimalPoint(QString &input)
{
return input.replace('.', QLocale::system().decimalPoint());
}
}
//! \endcond

View File

@@ -139,6 +139,9 @@ namespace BlackMisc
//! Int to hex value
BLACKMISC_EXPORT QString intToHex(int value, int digits = 2);
//! Replace dot '.' by locale decimal point
BLACKMISC_EXPORT QString dotToLocaleDecimalPoint(QString &input);
//! Int to hex value (per byte, 2 digits)
BLACKMISC_EXPORT QString bytesToHexString(const QByteArray &bytes);