mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-09 21:45:34 +08:00
refs #77, used locale aware number parsing for command parser
This commit is contained in:
committed by
Roland Winklmeier
parent
c173a30a94
commit
eb13c9d4ae
@@ -63,7 +63,7 @@ namespace BlackMisc
|
||||
PQ invalid;
|
||||
invalid.setNull();
|
||||
if (value.isEmpty()) return invalid;
|
||||
QVariant qv = CPqString::parseToVariant(value, mode);
|
||||
QVariant qv = parseToVariant(value, mode);
|
||||
if (!qv.isNull() && qv.canConvert<PQ>())
|
||||
{
|
||||
return qv.value<PQ>();
|
||||
@@ -71,6 +71,9 @@ namespace BlackMisc
|
||||
return invalid;
|
||||
}
|
||||
|
||||
//! Locale aware parsing
|
||||
static double parseNumber(const QString &number, bool &success, SeparatorMode mode = SeparatorsCLocale);
|
||||
|
||||
private:
|
||||
BLACK_ENABLE_TUPLE_CONVERSION(CPqString)
|
||||
QString m_string;
|
||||
|
||||
Reference in New Issue
Block a user