path: root/src/tools/uic/cpp/cppwritedeclaration.cpp
diff options
authorEdward Welbourne <>2017-10-13 18:10:39 +0200
committerEdward Welbourne <>2017-10-16 16:11:19 +0000
commita090076e93487f8e461d9b866b9da1c0c21cb59b (patch)
tree3719fc77f5e3bb3e6e1434ede80062758c98ff44 /src/tools/uic/cpp/cppwritedeclaration.cpp
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 <> Change-Id: I0911b9c945a94ca24c3dfb23ed6a849141076326 Reviewed-by: Jake Petroules <>
Diffstat (limited to 'src/tools/uic/cpp/cppwritedeclaration.cpp')
0 files changed, 0 insertions, 0 deletions