qt5base-lts/tests/auto/corelib/tools
Edward Welbourne 81858bf172 Don't pretend we know what DST to use for an offset date.
When QDateTime::addDate() and friends sanitize their end-state, they
were using the DST status of their start-state (if known) to control
it.  This lead to misguided results and, in particular, inconsistent
results given that a raw-constructed QDateTime comes into being
ignorant of its DST, while a .toLocalTime() one knows its DST.

Furthermore, the code to do this was triplicated, tricky and poorly
explained.  So pull it out into a local static function and explain
what it's doing, and why, more clearly and only once.

Task-number: QTBUG-49008
Change-Id: Ia4bb3c5e9267fff8bb963ea705267998218ed623
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-01-12 09:23:55 +00:00
..
collections tst_collections: "explicit instantiation of 'NS::QList' must occur in namespace 'NS'" 2015-12-23 08:35:49 +00:00
qalgorithms Purge extraneous execute permissions. 2015-09-30 18:26:21 +00:00
qarraydata
qarraydata_strictiterators
qbitarray
qbytearray QByteArray: add {const_,reverse_iterator}, {c,}r{begin,end}() 2015-07-07 05:22:08 +00:00
qbytearraylist
qbytearraymatcher
qbytedatabuffer
qcache
qchar Update Unicode data & algorithms up to v8.0 2015-11-05 08:25:02 +00:00
qcollator Replace MAC OS X with OS X 2015-06-30 07:33:31 +00:00
qcommandlineparser QCommandLineOption: optimize ctors 2015-06-19 16:29:50 +00:00
qcontiguouscache
qcryptographichash
qdate QDate: fix calculation of the week number for the last days of 2020 2016-01-09 09:13:44 +00:00
qdatetime Don't pretend we know what DST to use for an offset date. 2016-01-12 09:23:55 +00:00
qeasingcurve
qelapsedtimer
qexplicitlyshareddatapointer
qfreelist
qhash Introduce QHash key iterators 2015-07-28 19:11:17 +00:00
qhash_strictiterators
qhashfunctions Add getter and setter for qt_qhash_seed 2015-09-22 14:17:46 +00:00
qlatin1string Use correct test to add C++14 to the project configuration 2015-12-01 15:46:31 +00:00
qline
qlinkedlist QLinkedList/QSet: add {const_,}reverse_iterator, {c,}r{begin,end}() 2015-10-13 18:07:20 +00:00
qlist Tests: Replace Q[TRY]_VERIFY(v == true|false) by QVERIFY(v)|QVERIFY(!v). 2015-07-27 12:09:19 +00:00
qlist_strictiterators
qlocale Fix compilation for WinRT 2015-12-14 08:43:15 +00:00
qmap Introduce QMap key iterators 2015-07-28 19:11:12 +00:00
qmap_strictiterators
qmargins
qmessageauthenticationcode
qpair
qpoint
qpointf
qqueue
qrect
qregexp
qregularexpression Merge remote-tracking branch 'origin/5.5' into 5.6 2015-08-26 20:06:57 +02:00
qringbuffer Replace QVERIFY with QCOMPARE in QRingBuffer autotest 2015-06-23 05:59:13 +00:00
qscopedpointer
qscopedvaluerollback
qset QLinkedList/QSet: add {const_,}reverse_iterator, {c,}r{begin,end}() 2015-10-13 18:07:20 +00:00
qsharedpointer Fix constructing a QSharedPointer<const> of a QEnableSharedFromThis type 2015-12-08 06:32:20 +00:00
qsize
qsizef
qstl
qstring Revert "QString: preserve embedded NULs when converting from QByteArray" 2016-01-12 06:13:05 +00:00
qstring_no_cast_from_bytearray
qstringbuilder
qstringiterator
qstringlist
qstringmatcher
qstringref QStringRef: add truncate() 2015-06-19 05:41:41 +00:00
qtextboundaryfinder Update Unicode data files to v8.0 2015-11-05 08:24:58 +00:00
qtime Avoid overflow in QTime::addSecs with too big a number of seconds 2015-08-19 22:13:40 +00:00
qtimeline Stabilize tst_qtimeline::resume 2015-12-21 08:53:21 +00:00
qtimezone Merge remote-tracking branch 'origin/5.5' into dev 2015-08-06 10:54:01 +02:00
qvarlengtharray Merge remote-tracking branch 'origin/5.5' into HEAD 2015-07-17 16:35:42 +02:00
qvector QVector: add an rvalue overload of push_back/append 2015-07-19 18:09:27 +00:00
qvector_strictiterators
qversionnumber Use correct test to add C++14 to the project configuration 2015-12-01 15:46:31 +00:00
tools.pro QLatin1String: add test 2015-10-19 15:55:21 +00:00