Add support for external drag and drop in Quick items.

Add dragType enums with values of None, Automatic, Internal (default).
Setting to Automatic allows startDrag to be called automatically.
Setting to Internal (default) retains old behavior.

Add mimeData to Drag item to enable external drags.

Call startDrag to start drag manually or change from internal drag to
external drag. Added events dragStarted and dragFinished that get
invoked from startDrag.

Mime data must be specified in the mimeData property as
mime-type / data pairs.

Moved QQuickDrag from qquickmousearea* files to qquickdrag* files to
reduce header interdependencies that caused linking errors in other
modules and also to improve code organization.

Allow DropArea to receive and process external data.

Introduced new variable containsDrag to QQuickDropAreaPrivate. This
replaces mimeData which was previously being used to determine if a
drop operation was currently occurring. The problem was that mimeData
was being externally destructed.

Also introduced accessor methods for getting color, html, image, text,
and urls out of the drop. This facilitates dropping of external data of
those types onto a DropArea.

Added example quick/externaldraganddrop.

Task-number: QTBUG-27498
Change-Id: I1420df7c161ea3399e49a23305273e106baa246f
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Convenience function for resetting the OpenGL state.

Change-Id: I222930c74b9153c4d6d2b62afe0cc2906afb61fa
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Make tiled images not use atlas.

The imagenode has two code paths, one fast path relying on
GL_REPEAT and one slower based on one quad per internal tile.
The quad path is very costly and should be avoided at all cost
so extract the texture from the atlas when we have tiling.

Task-number: QTBUG-33310
Task-number: QTBUG-29786

Change-Id: I952749e86dc407db43b168db3ab880eb93329a7a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Fix partial rebuilds and geometry changes.

When we do partial rebuilds, we need to update the render order
for the entire subtree unconditionally. The previous logic
was to reuse existing render orders beneath batch roots, which
caused overlapping orders to be used.

When geometry of an alpha batch changes, we need to rebuild
everything under the current root. Otherwise, we might end
up with previously batched content which incorrectly
overlaps the changed geometry.

Change-Id: I7b6de5ce34a02434294ac5ae29ae1b87eb3c4464
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Trigger rebuild when xform of alpha nodes change.

When transforms change, overlaps may have changed, so we
need to rebuild all batches under the current root.

Instead of adding taggedRoots logic for rebuilding
batches only, we reuse the existing tagged roots for render
lists. This one is slightly more expensive, but for now
I believe the reduced code complexity outweights the tiny
overhead.

Change-Id: I1bd0efc18e5628f404d6d4dce38c725436e87ce5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Fix warning by ICC: function without return value

Yes, it can't be reached due to the Q_UNREACHABLE(). ICC expands that to an
__assume(0), which I guess isn't strong enough.

qv4isel_util_p.h(94): error #1011: missing return statement at end of non-void function "QQmlJS::convertToValue"

Change-Id: I41d9fd7382a41fe0e753812fc1d71fdc802ef854
Reviewed-by: Lars Knoll <lars.knoll@digia.com>