Fix some style issues in tst_qquickwindow

Change-Id: I5802f10f9aaff3e443696644d07203160fbc3b91
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Debugger: Fix crash when app exits while debugging

Make sure we don't access an already deleted v8engine any more.

Task-number: QTBUG-33100
Change-Id: Ic517577ae30b41375cbf9f787cfe0a29121171e2
Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
tst_qquickitem: Make exclusion more fine-grained.

Revert 764bd1cb0f8f2db4f84018890b9ebb8b42741789 .

Task-number: QTBUG-32664
Change-Id: Idbe476a3e34b584b12e653f23a36d58028a2bf21
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
fix include guard to not clash with qscriptvalueiterator

Change-Id: Ifb51ed15c93ed68e2a18edd4cda4a921f7e41c34
Reviewed-by: Albert Astals Cid <albert.astals@canonical.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Stabilize tst_qquickmousearea.

Replace createView() by initView(), instantiate windows on stack or
use QScopedPointer. Center view in available geometry and make
sure the mouse cursor is outside, since otherwise it can
interfere with drag->active(). Remove insignification
introduced by c1fbee270f50c44f47d4eb287765ad60f362c87a .

Task-number: QTBUG-33006
Change-Id: I8fc661444bc42899dfa3d87887c594270483e508
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Stabilize tests using utilities from QQuickViewTestUtil.

Change QQuickViewTestUtil::createView() to center the window on
the screen to avoid taskbar areas. Add routine to move the mouse
away and use that in tests using QQuickViewTestUtil::flick()
and other mouse interaction since the mouse cursor can interfere
with it. Affected tests:  qquickgridview, qquickpathview,
qquickflickable, qquicklistview, qquickrepeater and qquickpositioners.

Task-number: QTBUG-33017
Change-Id: I540c0efb54a231dcb44c8fd5ad9573a2d4d4b9df
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Explicitly call setCursor in the QQuickMouseArea constructor

QQuickItemPrivate has a boolean hasCursor that is used by QQuickWindow
to determine whether to use the cursor for an item. QQuickMouseArea has
a default cursorShape of Qt.ArrowCursor that is ignored due to hasCursor
not being set. Thus, call setCursor in the QQuickMouseArea constructor
to sync the cursor state of the QQuickItem and the MouseArea.

Task-number: QTBUG-33157

Change-Id: I56402564bd72bdc89d6ef8e5bc75bfd07c096202
Reviewed-by: Josh Faust <jfaust@suitabletech.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Fix warning about unused variable.

Change-Id: I29f5b2b890f561bc97749d19c0c5f461511c7637
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Fix girth of native text with grayscale AA or style

When using a grayscale glyph cache, the source data should be
interpreted differently, like in the OpenGL paint engine. We
should not do srgb gamma correction and we should use the default
blend mode. This also fixes styled text, since that will always
default to a grayscale glyph cache.

This patch ensures:
1. That we detect when the font requires grayscale AA (e.g. when
font smoothing is turned off in the OS)
2. That we interpret the source data correctly.

Task-number: QTBUG-31720
Change-Id: I600f4a28cd443caa0a8d5544d219b47436cde693
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Don't crash due to KeyRelease on an unloaded Item

Task-number: QTBUG-33127
Change-Id: Ie0c28abdb32c3b2318f934d3d2ddf459329384a2
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Updated distance field glyph caches to use QDistanceField.

Some OpenGL drivers assume alpha-only images are always tightly packed,
regardless of what is set for GL_UNPACK_ALIGNMENT. We now use
QDistanceField to store glyphs, which aligns scanlines on a 1-byte
boundary, instead of QImage which uses a 4-byte boundary. A previous
workaround uploaded scanlines one at a time, but this is also broken
with some other drivers...

Task-number: QTBUG-30908
Task-number: QTBUG-32861
Change-Id: I46527fb48de1e00116f776427c45baa752c6176d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Fix crash when trying to set versioned group properties

If a property isn't available due to revisioning, we print an error message.
Producing the error message should be done with care of obj->type being -1
to avoid out-of-bounds on the output->types array.

Task-number: QTBUG-33179

Change-Id: I7bd420f2dfa0ca2d616340a68999d58022974435
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Initialize variables in ShaderEffectSource's texture provider.

Change-Id: I3d737b923ee0282f58d7a2ee96824f184469daf5
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
tst_qquickpathview::cancelDrag(): Move mouse after setUrl().

Take correct window size into account.

Task-number: QTBUG-32662

Change-Id: Ie04c8fe8e254d232f076e6f9d9d0d96f12a4530f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
tst_QQuickItemLayer: Specify precision in shader for ANGLE.

tst_QQuickItemLayer::layerSourceRect() QQuickCustomMaterialShader:
Shader compilation failed: ERROR: 0:9: '' : No precision specified for
(float).

Change-Id: I3ab87c747bed5b8c8cfcf5527ee2a8b2ebd891a2
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Stabilize tst_rendernode.

Center windows on screen, add QSKIP for screen depth, add error message
to color comparison.

Change-Id: I03d600a4810f27654e0b971b19631ba51c9f6874
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Fix crash on QV8Engine destruction

QObjects tracked by QV8Engine can end up causing bindings to execute
when the QV8Engine is being deleted, which can call through to
QV8Engine::fromVariant(). This change ensure that that is valid
while the QObjects are being destroyed.

Task-number: QTBUG-31555

Change-Id: Iaea402ff65993bb2322af403d3590653005e30fe
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Fix compiler warning about unused variable

Change-Id: I2dda2462170658a678a35a6fafdb5d39a8d8e9f4
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Fix tons of reference errors in tst_qquickpositioners

Due to missing context properties:
ReferenceError: fooBar is not defined

Task-number: QTBUG-33018
Change-Id: Ibba95ab688a8d5cadc94bdeb30d0ec087ffe3c0c
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Fix crash tst_qqmllanguage

qmlClearTypeRegistrations() shouldn't be called when instances of
QQmlEngine are still open. This can lead to unexpected behavior.

For the qmlClearTypeRegistrations() function there is separate
autotest

Task-number: QTBUG-32078
Change-Id: I32612bc82602593d902bbffc58911e427b50524f
Reviewed-by: Alan Alpert <aalpert@blackberry.com>