Prevent a crash when the item is deleted but not removed from cache

If the item is not removed from the cache when it is deleted then the
cache can end up pointing to an invalid item which when accessed will
cause a crash.

Task-number: QTBUG-38430

[ChangeLog][QtQml] Prevent a crash when the item is deleted
but is not removed from the QQmlDelegateModel's cache.

Change-Id: I8cf76b014be62a432d909a3573231cec84a6d678
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Make sure the clipPath is retained as state of Context2D

The W3C spec doesn't say anything about the clip path getting reset
automatically at any point and so I guess we should retain it. This of
course is terribly annoying if the canvas element gets resized and ends
up with a default clipPath that doesn't match the canvas anymore. You
basically have to call reset() in every onPaint now. However, this just
highlights a general problem with stateful canvas contexts and we cannot
ignore user defined clipPaths like this.

Task-number: QTBUG-38297
Change-Id: I233226af6458298ef3d752d08ecdebebae2e0a8f
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
QQuickItemView/QQuickPathView: Fix creation of delegates

When the delegate is set before the model and
after the ItemView/PathView has been created

Task-number: QTBUG-38368
Change-Id: I6963abe28087699cf4e8921153dc7641bae3b220
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
qmlplugindump: correctly merge composite types

When hiding part of the hierarchy during the merging of composite
types properties/methods/signals that are hidden should not be dumped
twice.

Task-number: QTBUG-38354
Change-Id: I328cf25dd5a70e1c0fce017e8ae572e8a9e56245
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
If a popup window is opened, do not change the focus

It's not working to have QQuickWindow lose focus every time a menu is opened.
This doesn't happen on OSX because menus are implemented as special native
ones, but on X11 a menu is another window.  In QtQuick Controls it's
useful for copy/cut/paste Actions to be enabled based on whether
some text has focus.

Change-Id: I092b46133b9a8a44639ad9d89ee2bdfe30206bd9
Task-number: QTBUG-36292
Task-number: QTBUG-36332
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Implement the new inputmethod query API for Qt Quick

Part fixing Android input methods. This change corresponds
to 68a9229a97d358639 in the qtbase repository.

Task-number: QTBUG-37511
Change-Id: I483abf6a9d5dec86dbd1ae2dff2a85bc19d126f1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Make the Clocks example use the resource system

Make the Clocks example use the Qt resource system and the
shared main(), in order to have easy deployment to all
platforms and support for shadow builds.

Task-number: QTBUG-37203
Change-Id: Ia235b6b2397cfaeb20f0c7ea0d6196c603b20099
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Extend the QML bootstrap library by the IR builders

This is among other things needed to fix the qml import scanner to detect
dependencies from .js files correctly.

The patch also fixes the use of Q_QML_EXPORT towards Q_QML_PRIVATE_EXPORT
where appropriate and corrects the wrong include path for the double conversion
code to actually be relative to the file it is included from. This worked by
accident because of other include paths present in the build.

Change-Id: I338583dad2f76300819af8ab0dae8e5724c84430
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Fix parsing of JS imports from JS files

If a .js file had an import of another .js file itself, like so:

    .import "otherFile.js" as Blah

then the import scanner would keep the quotes and store

    "\"otherFile.js\""

in the JSON as opposed to

    "otherFile.js"

This is fixed by making use of the same code for extracting the .import
statements from JS files that is also used by the engine itself.

Additionally this fixes the use of comments in .import lines (and other
whitespace characters not producing tokens).

Change-Id: I4dd4a5217308f6fc93b6b148cd8e13392f97d2a6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Fix crash when loading QML that tries to set non-existent group properties

This happens when trying to search for implicit component definitions,
which only makes sense if we have a property cache.

Task-number: QTBUG-38466
Change-Id: I788159453efc24bcda1b9709a1933b49fd54d6a7
Reviewed-by: Liang Qi <liang.qi@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
V4 regalloc: fix register spill choice under high pressure.

When a register is needed for an input parameter of an operation, and
all registers are already in use, do not select a register for spilling
when it is also used in the current operation.

Task-number: QTBUG-38451
Change-Id: I4a8f28cbaadce2dbb9d0c450ccac0ed572936c24
Reviewed-by: Albert Astals Cid <albert.astals@canonical.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Getting the render window of an offscreen window

When using a QQuickWidget, the QQuickWindow is hidden and the contents
are displayed in another window. Some components need to query the actual
window, e.g. when positioning a popup.

Task-number: QTBUG-38116
Change-Id: I34452be2179ccc9e216e4d89264dc700e0cf42a0
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Follow QOpenGLContext API renaming

Task-number: QTBUG-38564
Change-Id: Ice1170339f7d650fcb6accfccf325471629343d6
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>