qtdeclarative/tests
Erik Verbruggen 6e687e8571 V4: Handle QTime->DateObject conversion better
By specification, date conversion functions for dates before the epoch
are not DST corrected. We converted QTime to a QDateTime where we set
the date part to Jan. 1, 1970, and then convert that to msecs since the
epoch UTC. For places on Earth where they had DST on that day (e.g.
Hobart in Australia), strange things happen: conversion from a QTime to
DateObject will use DST (because it's after the epoch in local time),
but conversions from DateObject to QTime won't use the DST because it's
before the epoch (in UTC).

Now as everyone knows, a 24-hour clock time has no meaning without a
date, only "elapsed time" has. But users still expect to be able to pass
QTime to QML/JS. So, we do the conversion on day 0 of month 0 of year 0,
and all of it in local time. This gives a stable conversion in both
directions, and the values in both C++ and QML/JS are the same for any
timezone (with or without DST) on this planet.

Task-number: QTBUG-54378
Change-Id: I892e16a93f015e92d311c6cae3ae7768b7373f6a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-08-10 17:17:15 +00:00
..
auto V4: Handle QTime->DateObject conversion better 2016-08-10 17:17:15 +00:00
benchmarks Merge remote-tracking branch 'origin/5.7' into dev 2016-08-02 18:34:30 +02:00
global bic: Add 5.{3,4}.0 bic data for QtQuickWidgets 2015-03-02 20:19:30 +00:00
manual Merge remote-tracking branch 'origin/5.7' into dev 2016-08-02 18:34:30 +02:00
system Updated license headers 2016-01-20 11:46:25 +00:00
testapplications Merge remote-tracking branch 'origin/5.6' into 5.7 2016-04-08 13:03:25 +02:00
README
tests.pro Add benchmarks to the "make benchmark" targets that are known to work 2016-03-17 13:22:44 +00:00

README

This directory contains autotests and benchmarks based on QTestlib. In order
to run the autotests reliably, you need to configure a desktop to match the
test environment that these tests are written for.

Linux X11:

   * The user must be logged in to an active desktop; you can't run the
     autotests without a valid DISPLAY that allows X11 connections.

   * The tests are run against a KDE3 or KDE4 desktop.

   * Window manager uses "click to focus", and not "focus follows mouse". Many
     tests move the mouse cursor around and expect this to not affect focus
     and activation.

   * Disable "click to activate", i.e., when a window is opened, the window
     manager should automatically activate it (give it input focus) and not
     wait for the user to click the window.