WinRT: Improve event dispatcher

- Sleep when there are no events to process. Otherwise, CPU usage remains
  high all the time.
- Reorder processing so window events are processed after being collected
  by the native event loop.
- Provide basic interrupt and WaitForMoreEvents flag support.

Task-number: QTBUG-35327

Change-Id: I8a5545cba5f3e65eafd0bb40695bf6ffde68bb04
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
WinRT: Enable accessibility by default

While there is no implementation for accessibility yet, enabling it allows
the interfaces to be used and an accessibility plugin to be developed
for this platform.

IAccessible2 and MSAA bridge autotests are disabled for this platform.

Change-Id: I2bfd07f6b21ca469b27d88ef11df723ac8ff8202
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
qmake vcproj generator: Honor the preferred MSVC version in the mkspec

Some cross-compiling mkspecs may require a different MSVC version than
the one found in the path (or the default version). This change allows
the preferred MSVC version to be selected from the mkspec's MSVC_VER
variable when found.

Task-number: QTBUG-35328
Change-Id: I19e03101e3921dfd5026421aef4630e11b9f131e
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
qmake vcproj generator: Don't generate WinMD by default on WinRT

Visual Studio will default to generating metadata, even if it is not
written to the vcproj. Since there is no metadata file, the build will
fail. This change keeps a saner default for this option when generating
WinRT project files.

Task-number: QTBUG-35328

Change-Id: Ie693e270ef0b9d9677d53af0c60905f048235bc5
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
qmake vcproj generator: Add app manifest for WinRT projects

When creating a MSVC project file for WinRT/WinPhone, the package
manifest and all referenced icons should be automatically added as
content items.

Task-number: QTBUG-35328

Change-Id: Id7f34388c5ba6746392ddadbb795ef47bef34af6
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
qmake vcproj: Correct VCProject Version strings

These strings are one version too large.

Change-Id: If83649725ccf087075610255516ebf7a51338359
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
qmake vcproj: Support setting the SDK version

This adds the required members to allow setting the SDK version, and uses
them when creating WinRT projects.

Task-number: QTBUG-35328

Change-Id: I500ea77c41e27cbcc850462034c0eba8c5d1f124
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
WinRT: Properly return exit code

Instead of returning the HRESULT of the Run method, return the actual
exit code of the application.

Change-Id: I1e3d654ecdb4c319d4a08fe8a11e8699d186f66b
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
WinRT: Clean up core event dispatcher

- Move private classes in the .cpp file (they aren't needed outside)
- Conform to Qt style, such as includes and braces
- Use ComPtr where appropriate
- Use foreach where appropriate
- Remove non-functional wake/interrupt leftovers
- Remove redundant timer list
- Make the timer callback a static method, so it won't crash if it
  gets called on shutdown

Task-number: QTBUG-35945

Change-Id: I5426fba2735e908a04ea60287f9936f5abde6644
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Prevent foolish use of setuid when using Qt.

In order to prevent people from shooting themselves in the foot, abort
if we're running setuid. This behavior can be disabled by calling
QCoreApplication::setSetuidAllowed(true) in order to support legacy code.

[ChangeLog][QtCore][Important Behavior Changes] Running Qt applications
that are setuid has been prevented. If you really need to do this then
you can call QCoreApplication::setSetuidAllowed(true) before creating the
QCoreApplication instance.

Change-Id: I992a9a0cd8420693d438852a05666e3dbb2c9d6a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Add takeTexture() to QOpenGLFramebufferObject

Add an API that allows to retrieve and detach the texture from the
framebuffer object. The next bind() call will then create and attach a
new texture.

[ChangeLog][QtGui][QOpenGLFramebufferObject] Added takeTexture() for
retrieving and detaching the texture from the framebuffer object.

Task-number: QTBUG-35881
Change-Id: I2cca37f5872c1685b1238047f8b912e6534ab781
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
QNX: Add some more properties to a touch point

Change-Id: Ic1c889557148f112e357c3ee34199ff6d19b4a6e
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Update testlib selftest units

The units that were supposed to have variance were completely off in the
test leading to all benchmarks with slight variance being completely
flaky.

Change-Id: Ib76593813974adee462b3f03be9370d2248d770c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Make output when failing a test for diff in line numbers more verbose

Change-Id: I536ffddffe40f9f6bbcd75f312a5f902763e1131
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Windows/Windows CE: Do not dynamically load shell32/coredll.

Those libraries are contained in QMAKE_LIBS_CORE and
GetSpecialFolderPath() is present in all supported versions.

Change-Id: Iae40714e0f234625b063aeb50e29fc79c4aaa6ea
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>