summaryrefslogtreecommitdiffstats
path: root/src/plugins/sqldrivers
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2018-06-08 17:37:49 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2018-06-14 09:13:36 +0000
commit91f3687ee51db83d9018bd61c3fbc736c6e9912e (patch)
tree4a6ba0a2e5f91dc9ebe19f400bbc5506f81b6375 /src/plugins/sqldrivers
parent6afd5990c79d86d4136b41018066c05c95d1b0d2 (diff)
Make QString's formatting of doubles be consistent with other places
QString::sprintf(), like the C printf-family, always includes two digits in any exponent it outputs. Up to 5.6, number() and arg() taking a double did the same; but changes at 5.7 to enable opting out of the leading zero this implies for a single-digit exponent accidentally opted out of it in args() and number(). This commit fixes number() and arg() to include QLocaleData::ZeroPadExponent in the flags they pass down to the C locale's doubleToString(), restoring the prior behavior, including consistency with sprintf(). [ChangeLog][QtCore][QString] Formatting of doubles with single-digit exponent, by number() or args(), now includes a leading zero in that exponent, consistently with sprintf(), as it did up to 5.6. Task-number: QTBUG-63620 Change-Id: I10c491902b8556e9f19e605177ead8d9fd32abd9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/plugins/sqldrivers')
0 files changed, 0 insertions, 0 deletions