summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2017-10-13 18:10:39 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2017-10-16 16:11:19 +0000
commita090076e93487f8e461d9b866b9da1c0c21cb59b (patch)
tree3719fc77f5e3bb3e6e1434ede80062758c98ff44 /src/gui
parent414c058ca70f8e2d0a43686aa1644534a628b3ef (diff)
Don't lose precision in QMacTimeZonePrivate::previousTransition()
NSTimeInterval is a typedef for double, but the code stored its value in an int, and only then multiplied by 1000. Fix by only truncating NSTimeIntervals to int(64_t) *after* the multiplication by 1e3 to get milliseconds. While it's highly unlikely that a transition will have fractional seconds length, don't assume if you can just calculate the more exact result. Adapted-From: Marc Mutz <marc.mutz@kdab.com> Change-Id: I0911b9c945a94ca24c3dfb23ed6a849141076326 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'src/gui')
0 files changed, 0 insertions, 0 deletions