summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qlocale.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@theqtcompany.com>2015-10-19 14:52:19 +0200
committerUlf Hermann <ulf.hermann@theqtcompany.com>2015-11-23 14:13:42 +0000
commit15b5b3b3f01e400e46fe67babe593ede373dac4b (patch)
tree823f6a27092b9647dbe1f4a9004c99e9975e71c7 /src/corelib/tools/qlocale.h
parent726fed0d67013cbfac7921d3d4613ca83406fb0f (diff)
Add flags to omit/reject padding in scientific notation exponents
The EcmaScript format for printing doubles in exponent form differs from Qt's format only in this aspect. EcmaScript explicitly prohibits leading zeroes in exponents. It is thus worthwhile to add those flags in order to be able to generate and parse doubles in compliance with EcmaScript. [ChangeLog][QtCore][QLocale] Additional flags in QLocale::NumberOption allow generating and parsing doubles in EcmaScript compliant format. Change-Id: Ia7b82c2e67bb8b80bd890014ff5cd4563faf2a03 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/corelib/tools/qlocale.h')
-rw-r--r--src/corelib/tools/qlocale.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/tools/qlocale.h b/src/corelib/tools/qlocale.h
index f64a25bd00..e90354138c 100644
--- a/src/corelib/tools/qlocale.h
+++ b/src/corelib/tools/qlocale.h
@@ -843,8 +843,11 @@ public:
enum FormatType { LongFormat, ShortFormat, NarrowFormat };
enum NumberOption {
+ DefaultNumberOptions = 0x0,
OmitGroupSeparator = 0x01,
- RejectGroupSeparator = 0x02
+ RejectGroupSeparator = 0x02,
+ OmitLeadingZeroInExponent = 0x04,
+ RejectLeadingZeroInExponent = 0x08
};
Q_DECLARE_FLAGS(NumberOptions, NumberOption)