qt5base-lts/tests/auto
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
..
cmake Don't attempt to test DBus on QNX. 2012-08-28 21:17:48 +02:00
compilerwarnings/data Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
concurrent Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
corelib Use true and false in preference to TRUE and FALSE 2012-09-05 03:03:05 +02:00
dbus Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
gui Made QImage::fill(uint pixel) for RGB888 accept QRgb values. 2012-08-29 16:53:00 +02:00
guiapplauncher Update the documentation after moving examples. 2011-07-05 21:19:08 +02:00
network test: Check for null string comparison 2012-09-05 03:03:02 +02:00
opengl Remove some dead code wrapped in Q_WS_QWS. 2012-08-03 11:24:28 +02:00
other Fix some warnings in tests. 2012-08-28 17:07:15 +02:00
printsupport Ensure that printer orientation is preserved 2012-08-30 08:54:59 +02:00
shared Expose QPA API under qpa/* 2012-05-07 20:25:24 +02:00
sql Use QStringList::join(QChar) overload where applicable [QtSql] 2012-09-03 19:35:25 +02:00
testlib Make QSignalSpy copy QVariant parameters directly 2012-08-07 11:15:55 +02:00
tools Auto test for 'qmake -project' use case. 2012-09-04 10:30:33 +02:00
widgets Fix 3 digit day being displayed by QDateEdit. 2012-09-05 21:06:39 +02:00
xml Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
auto.pro tests: fixed check for QtOpenGL 2012-07-30 06:06:12 +02:00
network-settings.h Fix auto tests build with gcc 4.7 2012-05-23 00:42:20 +02:00
platformquirks.h Remove #ifdef Q_WS_ / include / #endif conditionals. 2012-07-16 16:30:55 +02:00
test.pl Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00