summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qmargins.cpp
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2018-11-19 16:27:03 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2018-11-23 10:05:06 +0000
commita9923674030980706940b3ee11145c38674bb35d (patch)
tree0fbc5b2b8e2eb4afa0f4e11f0ceeea013d2a81f6 /src/corelib/tools/qmargins.cpp
parent704137f8de49a55a1b21bb6d612d2594562f51ce (diff)
Change documentation of some toDouble()s to reflect reality
They actually return infinity if conversion overflows, while still setting ok to false; they were documented to return 0 on failure, with no mention of this special handling of overflow. Documented reality rather than changing the behavior. Gave underflow as an example of failure other than overflow (toDouble()s do indeed fail on it). Added some tests of out-of-range values, infinities and NaNs. [ChangeLog][QtCore][toDouble] QString, QByteArray and QLocale return an infinity on overflow (since 5.7), while setting ok to false; this was at odds with their documented behavior of returning 0 on failure. The documentation now reflects the actual behavior. Fixes: QTBUG-71256 Change-Id: I8d7e80ba1f06091cf0f1480c341553381103703b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/corelib/tools/qmargins.cpp')
0 files changed, 0 insertions, 0 deletions