mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-20 12:35:43 +08:00
Ref T111, utility function for local decimal point
This commit is contained in:
committed by
Mathew Sutcliffe
parent
9445bd56a3
commit
bb13a32c7c
@@ -285,6 +285,11 @@ namespace BlackMisc
|
|||||||
// SystemLocaleLongDate,
|
// SystemLocaleLongDate,
|
||||||
return QDateTime();
|
return QDateTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString dotToLocaleDecimalPoint(QString &input)
|
||||||
|
{
|
||||||
|
return input.replace('.', QLocale::system().decimalPoint());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \endcond
|
//! \endcond
|
||||||
|
|||||||
@@ -139,6 +139,9 @@ namespace BlackMisc
|
|||||||
//! Int to hex value
|
//! Int to hex value
|
||||||
BLACKMISC_EXPORT QString intToHex(int value, int digits = 2);
|
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)
|
//! Int to hex value (per byte, 2 digits)
|
||||||
BLACKMISC_EXPORT QString bytesToHexString(const QByteArray &bytes);
|
BLACKMISC_EXPORT QString bytesToHexString(const QByteArray &bytes);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user