WinRT: Fix multi-touch on PC

The pointer ID was incorrectly interpreted as a device ID, which caused
creating a new QTouchDevice for each touch update and potential crashes
in QtQuick. The handling has now been simplified and aligned with Windows
Phone, treating all touch events as if they originate from the same
device. Given that the native device has no ID, it is not
possible to track the native device between events anyway (even the
pointer values change).

Task-number: QTBUG-38745
Change-Id: I24b6c00b765dcb49cd653638afafc04fdd80f774
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Use XI2 event detail to determine changed mouse button

The button state part of the XI2 events appears to be badly constructed
on some devices and platforms. Even where supported the 'detail' field
of the XI2 events is what we should be reading since it indicates the
button the event refers to and not just the state of all buttons.

Task-number: QTBUG-38169
Change-Id: Iedb7971194b3c27448b72c285a54100c511c17e4
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Accessibility Android: Do not always append role

Task-number: QTBUG-36584
Change-Id: Id14962a9eb7a6c3ea78cefcfcc053fac886ba8f7
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
update changelog for QtSql 5.3.0

Change-Id: I84c85603488ae0ae3499446f835aa066cf6c96cb
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Direct2D QPA: Speed up text rendering

After analysing text drawing performance two things seem to take up most
of the time. The first is font lookup, the second is QVector
initialization.

To address the first point a per paint engine instance font cache is
introduced. At the moment no mechanism exists to clear this cache and
it is unbounded.

To address the second point, we simply switch to using QVarLengthArray
instead of QVector.

In an artificial benchmark that draws text in a tight loop, the first
change raised fps from ~70 to ~100. The second change further raised this
number to ~115 fps.

Change-Id: Iafa25c3e35bc42bd7c1582b0636e721c5193b494
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Direct2D QPA: Check Direct2D version

Since we require a relatively recent system, check the version of the
direct2d dll on disk and report an error to the user if it is too old.
Previously only a cryptic runtime error resulted from a direct2d version
that was too old.

Change-Id: I6c3955e1a98326fca6bcdc871b0a25291391ba88
Reviewed-by: Risto Avila <risto.avila@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Remove trailing whitespace.

Change-Id: Id487c8951d7f258c57fa71fd35a60ddb8c5a3fb2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Revive tst_qstylesheetstyle on Desktop platforms.

Task-number: QTBUG-21468
Change-Id: I37f741d9709b17ad31b01078e10538f0f6bff01a
Reviewed-by: Liang Qi <liang.qi@digia.com>
Fix tst_QStyleSheetStyle::toolTip().

Use the correct palette and enforce Fusion style to prevent
the Vista style from clobbering the tooltip palette in polish().

Task-number: QTBUG-38183
Change-Id: Id19d548f818d801c4914a343e08207195c343888
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Android: remove the duplicate registration for qt accessibility

Change-Id: I3241138e39b93657aee0564442f22ad0c40328d4
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
iOS: Gracefully handle cancelling of subset of active touches

When applying the five-finger pinch gesture, we get a touchesCancelled
callback with all five touch points, but the pinch gesture ends when
the second to last finger is released from the screen. The last finger
will not emit any more touch events, _but_, will contribute to starting
another pinch gesture. That second pinch gesture will _not_ trigger a
touchesCancelled event when starting, but as each finger is released,
and we may get touchesMoved events for the remaining fingers.

The event property 'allTouches' contains one less touch point than it
should, so this behavior is likely a bug in the iOS system gesture
recognizer, but have to take it into account when maintaining the Qt
touch state.

We do this by assuming that there are no cases where a sub-set of the
active touch events are intentionally cancelled, and always clear the
list of active touches.

Task-number: QTBUG-37304
Change-Id: Icee79978508ecbc6854c0fb55d2da48b99d92f96
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Android: text cursor position fixes

The Android input method protocol specifies that finishComposingText()
should not move the cursor. Since Qt likes to move the cursor to the
end of the newly committed text, we have to explicitly move the cursor
to where the preedit cursor used to be. Fortunately we already keep
track of that.

Also implement support for the newCursorPosition argument to commitText()
since the function needed to be rewritten anyway. (It was calling
finishComposingText().)

Task-number: QTBUG-38794
Change-Id: Iff2c43bdbd3dda812ccdc71da63f3fa730474eef
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Avoid drawing when the QOpenGLWidget isn't mapped

Do as QGLWidget::updateGL does and avoid calling paintGL in updateGL
when we we don't have a valid QSurface to draw on.

We currently end up calling makeCurrent on the context with a null
QSurface in that case, which is the equivalend of doneCurrent, and
causes QOpenGLContext::currentContext to return null later when paintGL
is called on the subclass.

Change-Id: I712ee59274855457b0e4de3757754f56b3528955
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Accessibility Android: Make debug tags consistent

Change-Id: I712e64002234d546365b44ca15ae93e8decac882
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Speed up tst_QXmlSimpleReader.

Increase the chunk size of the server and remove hard-coded
interval when waiting for the server to listen.
Unmodified, the test takes 170s on Windows.

Change-Id: I65bdc93ff78e1b4fb429fcafd0fdc5e80bb281f9
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
kms plugin: do not needlessly query drm information twice

QKmsDevice already requested the drmModeRes and drmModeConnector
information. Simply pass them to the QKmsScreen constructor instead of
requesting and freeing them there again.

Change-Id: I4897d76d7b13d83297c928b6e10e17ccdfdbd242
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
kms plugin: use first returned mode if no preferred one is present

The list of returned modes is scanned for the first one marked as
preferred, and that is used. If no preferred mode was found then the
builtin default mode of 1024x768 is used. Use that builtin mode only if
no modes were returned at all, pick the first one if any were returned.

Change-Id: Ib355cc92219ced093c605f49dae4e34ff244b639
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
qmake: Use QDir::toNativeSeparators on paths printed as info

Change-Id: I8c587164bcff742f7ac8ad3f3f28e0b16645cb2a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
move qlocale_mac.mm to OBJECTIVE_SOURCES

This fixes a warning when loading qmake.pro in Qt Creator on OS X.

Change-Id: Iabd70f2b5b9615d0fb1563081f485e6a4c828823
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Liang Qi <liang.qi@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
QDateTime: Add more tests for parsing/writing timezone offsets

The tests for toString/fromString previously didn't run tests
for timezones with hh:mm where mm != 00.

Change-Id: I74da99c5b6890f46ce06446084a8129b4cbc7a02
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: John Layt <jlayt@kde.org>