Document TextInput property displayText as read-only

Change-Id: Iff30a548fc2ef8ecf2fa6393832943f365cb0fa3
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
V4: fix inferred types of 30&&true and 30||true.

The type was incorrectly inferred as double instead of var.

Fixes ch10/10.5/10.5-7-b-3-s

Change-Id: I93a43318a94a820a1a2e05c7b670a08915b99723
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
V4 JIT: Change function call generation with registers.

When generating a function call where arguments are passed by reference,
first save all arguments that are in registers to the stack, and only
then put the references into the outgoing positions (stack or register).

Change-Id: Iaec4db6836e33627723eb4709fd6dad2b4ea8a1d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Fix build on iOS: define GL_DOUBLE

This patch will fix the build error:

qsgbatchrenderer.cpp:1844: error: use of undeclared identifier
GL_DOUBLE

Change-Id: I7981e303e4743bb610822633c7da433238de4683
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Tests: Disabled temporarily access type tests of QMetaMethod::Signal

Change in qtbase to make the QMetaMethod signals access Public instead
of Protected.

Change-Id: I2de17fdc7edb896eb82ae8f467919e4636904cf6
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Make sure we update texture parameters when using atlas textures.

The QSGTexture class tracks filter and wrap states internally
and only updates when new states have been set. When atlas
textures are used, multiple QSGTexture instances share the
same OpenGL texture id and the state will get out of sync.

Change-Id: Iaf6ba9764a67acf25d0a6b0a2fb18170122e3325
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Polish items on screen change.

The window device pixel ratio may change. Repaint
all items.

Change-Id: I09b782800c15ec6290bf79cb7c7a5d6e6c08b528
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Fix return type checks in test.

When calling into JavaScript, the specific type of the return value can
differ if that return value is a number. This is not only the case for
non-integral numbers, or numbers that do not fit into the (signed)
integer range, but it also depends on which optimizations are run. to
check if the return value is of a number type, use this method instead
of checking against a specific userType.

Change-Id: I0464c062bd617c83b7a1e887f7853aa5cd8f43e4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
V4: temporarilly disable the optmizer/regalloc.

There are two bugs for which patches are pending. In order to unblock
qtquickcontrols, this code is disabled until those pending patches are
merged.

Change-Id: I2362bf3db0614ef8c6f45a1506838f227ea17b59
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Tests: Re-enabled tests for access type of QMetaObject::Signal

QMetaMethod::Signal access is now QMetaMethod:Public in qtbase.

Change-Id: If1a3e76889bd25fb20ba6ed1e3b8206053acd8d9
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
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>
Change access mode for functions declared in qml

Give the method a QMetaMethod::Public access instead
of a QMetaMethod::Protected one. This is valid
and is also needed when using the qmlplugindump tool
with composite types.

Change-Id: Ie1660716d8767cdc949f04a2f324799f2d2fe6c5
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
V4 regalloc: loading this never needs/needed a call.

Change-Id: Ibf95a5fe7634094386ba103b01b4e7e9f2c183e8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Make it possible to handle pointers to QObject derived in QML.

This way, properties of QObject derived types can be read in QML
code for example:

 Q_PROPERTY(MyObject* obj READ obj CONSTANT)

Previously, only QObject* types could be read by QML:

 Q_PROPERTY(QObject* obj READ obj CONSTANT)

This meant that multiple properties and methods had to be created
for classes which were relevant to both QML and non-QML code.

This patch lifts that restriction.

As a consequence, we can also remove a Q_EXPECT_FAIL from
the qqmllanguage unit test. That test was introduced in
commit 92562eacbc3c (Allow signal parameters which are custom QML
object-types, 2012-07-13) to document knowledge of the limitation
while fixing it as much as possible.

Task-number: QTBUG-26662

Change-Id: Ic85fa73c6f3655189438ec509765bae2eab9993a
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
V4 debugger: change agent API to work on all debuggers.

From a client point of view, there is no way to know which engine is
executing which script. So, instead of passing in a debugger for a
specific engine, have the agent set breakpoints on all debuggers.

Change-Id: I53b8cbc1bdc02c7705042f2ac3a99a041992c134
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>