qt5base-lts/tests/auto/widgets/itemviews/qitemdelegate
Edward Welbourne c27348985d Simplify date-time formatting in textForRole()
QAbstractItemDelegatePrivate::textForRole() was formatting date and
time separately, then gluing the parts back together with space.
QLocale can do that just fine itself (it has a toString() overload
that handles a QDateTime) and might even (some day) do it better.  To
my mild surprise, this proved sufficient to fix a problem with
date-time display in tool-tips, when the date-time includes a zone.

Extracted the date-time part of an existing selftest into a test of
its own and extended it to test times of each spec-type; verified that
the non-local spec cases of this all failed before this fix.

Task-number: QTBUG-61069
Change-Id: I6d6be0c27be9a557d8afc3ced200a10b2aaff816
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-11-30 20:21:42 +00:00
..
.gitignore Moved tests into integrationtests/ and widgets/ 2011-10-20 19:45:41 +02:00
BLACKLIST Blacklist tst_QItemDelegate::enterKey tests on openSUSE 42.3 2017-09-22 14:34:30 +00:00
qitemdelegate.pro Merge remote-tracking branch 'origin/5.7' into dev 2016-08-01 18:20:00 +02:00
tst_qitemdelegate.cpp Simplify date-time formatting in textForRole() 2017-11-30 20:21:42 +00:00