Let QDateTimeEdit control the century to use for two-digit years
Amends commit 41f84f3ddb780ec751e3fc706dd242fc4a99de7a - in which I neglected QDTE. It just needs to set defaultCenturyStart to its old initial year to match the prior behavior. Fixes: QTBUG-126698 Task-number: QTBUG-46843 Change-Id: If1edafe25778ad064f8f4393c8b1b3bbf5c957dc Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit 130e066868634f4663b4640ee1923eece1c171b1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
9dc063e7de
commit
696daaf050
@ -2536,6 +2536,7 @@ void QDateTimeEdit::initStyleOption(QStyleOptionSpinBox *option) const
|
||||
void QDateTimeEditPrivate::init(const QVariant &var)
|
||||
{
|
||||
Q_Q(QDateTimeEdit);
|
||||
defaultCenturyStart = QDATETIMEEDIT_DATE_INITIAL.year();
|
||||
switch (var.userType()) {
|
||||
case QMetaType::QDate:
|
||||
value = var.toDate().startOfDay(timeZone);
|
||||
|
Loading…
x
Reference in New Issue
Block a user