Avoid overflow in QTime::addSecs with too big a number of seconds
authorThiago Macieira <thiago.macieira@intel.com>
Tue, 11 Aug 2015 16:59:10 +0000 (09:59 -0700)
committerThiago Macieira <thiago.macieira@intel.com>
Wed, 19 Aug 2015 22:13:40 +0000 (22:13 +0000)
commitcc5e84c8788a6d6f05dfdf76fc249177ee74dce1
tree7463db9855881cdea212bdaf3879dca5a536c64c
parentcc6a06632b26c4f60cb29f540af6eafc31ae3f02
Avoid overflow in QTime::addSecs with too big a number of seconds

QDateTime::addSecs needs to do something similar, but not identical
because it needs the number of days too. And then there are daylight
savings transitions...

Task-number: QTBUG-47717
Change-Id: I7de033f80b0e4431b7f1ffff13f976f4f5e5a059
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
src/corelib/tools/qdatetime.cpp
tests/auto/corelib/tools/qtime/tst_qtime.cpp