summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@nokia.com>2012-08-21 14:46:42 +0200
committerQt by Nokia <qt-info@nokia.com>2012-09-05 21:06:39 +0200
commit2b562b756401da02017ec937fd2716dd6b9863d3 (patch)
tree3578f0a9ead68655887b7b2617ca1aa0695671fc /mkspecs
parentaba8de1bee8bbb9bc6b92e761a3dda0d829a211e (diff)
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>
Diffstat (limited to 'mkspecs')
0 files changed, 0 insertions, 0 deletions