qt5base-lts/tests/auto/widgets
Mitch Curtis 2b562b7564 Fix 3 digit day being displayed by QDateEdit.
When a QDateEdit has its display format set to "yyyy/MM/dd", its day
set to 31 and its month set to 2, it will display 291 as the day until
the cursor is moved or the focus changed. This is because
QDateTimeParser::parse calls sectionSize() for the day section, which
will sometimes return an incorrect size. There are also other display
formats affected by this bug (e.g. long day names).

For example, (in the context of sectionSize()) when text is
"2000/01/31" and displayText() is "2000/2/31", there is a difference
between displayText() and text - text is the previous value and
displayText() is the new value. The size difference is always due to
leading zeroes.

This patch makes QDateTimeParser keep track of the quantity of zeroes
added to each section and then factors this value into the result of
sectionSize() if there is a size difference between text and
displayText().

Task-number: QTBUG-26847
Change-Id: I3823cc41167ec920f742cb6a20d39fc5f433c915
Reviewed-by: Mitch Curtis <mitch.curtis@nokia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
Reviewed-by: aavit <qt_aavit@ovi.com>
2012-09-05 21:06:39 +02:00
..
dialogs Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
effects Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
graphicsview auto tests: updated for new QStyle pure virtuals 2012-08-31 18:56:35 +02:00
itemviews Fixed the QTreeView expansion/collpasing when animated 2012-08-29 20:40:17 +02:00
kernel auto tests: updated for new QStyle pure virtuals 2012-08-31 18:56:35 +02:00
styles auto tests: updated for new QStyle pure virtuals 2012-08-31 18:56:35 +02:00
util Revert "Move QWindowSystemInterface out of qpa." 2012-08-03 00:38:09 +02:00
widgets Fix 3 digit day being displayed by QDateEdit. 2012-09-05 21:06:39 +02:00
widgets.pro Moved tests into integrationtests/ and widgets/ 2011-10-20 19:45:41 +02:00