Use QDateTime for interfacing with QML

Authored by fvogt on May 30 2018, 7:27 PM.

Description

Use QDateTime for interfacing with QML

Summary:
QDate from/to JS Date has unexpected results, so use QDateTime to have a
timezone assigned to prevent conversions. That way the date values are
consistent.

The behaviour got changed with Qt 5.11 (see the linked bug report) which
lead to plasma showing the wrong dates in the calendar.

BUG: 394423

Test Plan:
Tested with and without this patch on Qt 5.10.1 and 5.11.0.
Now the correct date is displayed for -0004 and +0001 timezones.

Reviewers: Plasma, Frameworks, davidedmundson

Reviewed By: Plasma, davidedmundson

Subscribers: ngraham, Zren, sharvey, kde-frameworks-devel

Tags: Frameworks

Differential Revision: https://phabricator.kde.org/D13222

Details

Committed
fvogtJun 4 2018, 8:33 AM
Reviewer
Plasma
Differential Revision
D13222: Use QDateTime for interfacing with QML
Parents
R242:d7fa21a083cf: SVN_SILENT made messages (.desktop file) - always resolve ours
Branches
Unknown
Tags
Unknown