Commit 3379ace1 authored by Edward Welbourne's avatar Edward Welbourne
Browse files

QDateTimeEdit: synchronize time-spec before initializing display


QDateTimeEdit ignores the time-spec of its date-time value, using its
own time-spec instead; mostly, this works because it first conforms
the value to its own time-spec.  However, during construction, before
doing this, it set up its display data, which could leave it with a
different time (rather than a different representation of the given
time) than it was asked to use.

Moved the updateTimeSpec() calls to immediately after setting value in
QDateTimeEditPrivate::init() to ensure correct handling.  Added test.

Task-number: QTBUG-54781
Change-Id: I3b07c10997abb858fc0b40558bff96e3fdabbd83
Reviewed-by: default avatarJesus Fernandez <jesus.fernandez@qt.io>
Reviewed-by: default avatarMarc Mutz <marc.mutz@kdab.com>
Showing with 11 additions and 1 deletion
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment