platform/upstream/qtdeclarative.git
10 years agoMake QQuickFramebufferObject a texture provider.
Gunnar Sletta [Sat, 23 Aug 2014 07:00:51 +0000 (09:00 +0200)]
Make QQuickFramebufferObject a texture provider.

Change-Id: Ib9cf0f99dc07e4125c4ccd2d45da2839d8af88b6
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoFix up vao usage in qquickviewcomparison example
Laszlo Agocs [Fri, 22 Aug 2014 17:31:13 +0000 (19:31 +0200)]
Fix up vao usage in qquickviewcomparison example

The binder calls create() if needed, so drop that call.
In the render function however, drop the binder.
Trying to create() again and again on every frame is a
waste of time.

Change-Id: I1e9cd8e2c97030b96e604256661e65ce75446e9d
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
10 years agoDo not send deferred deletes from the QQuickWindow dtor
Laszlo Agocs [Tue, 26 Aug 2014 08:28:53 +0000 (10:28 +0200)]
Do not send deferred deletes from the QQuickWindow dtor

Otherwise doing deleteLater() on an ancestor of the QQuickWindow will
cause double deletion for that ancestor. This is typical when using
WA_DeleteOnClose since that uses deleteLater().

Task-number: QTBUG-40920
Change-Id: I9146fc0854f77c42cad2eda23b3cdaa7a9e22080
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
10 years agoMerge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4
Simon Hausmann [Tue, 26 Aug 2014 07:51:49 +0000 (09:51 +0200)]
Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4

10 years agoMerge remote-tracking branch 'origin/5.3' into 5.4
Simon Hausmann [Tue, 26 Aug 2014 07:43:33 +0000 (09:43 +0200)]
Merge remote-tracking branch 'origin/5.3' into 5.4

Conflicts:
src/qml/qml/qqmlobjectcreator_p.h
Change-Id: I60858ddb46866a8fa1a8576bb05b412afeeb4e41

10 years agoMake QQuickPaintedItem a texture provider.
Gunnar Sletta [Sat, 23 Aug 2014 13:27:51 +0000 (15:27 +0200)]
Make QQuickPaintedItem a texture provider.

Change-Id: I605dc35fcc2284a890851c41946cf95537e92d2e
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoMake use of QQuickWindowQObjectCleanup in QQuickImage.
Gunnar Sletta [Sat, 23 Aug 2014 12:24:05 +0000 (14:24 +0200)]
Make use of QQuickWindowQObjectCleanup in QQuickImage.

Saves us a few lines..

Change-Id: I572f6fc44ede3b923208ce3563116d8fcc9bb922
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoMake Canvas a texture provider.
Gunnar Sletta [Sat, 23 Aug 2014 12:13:53 +0000 (14:13 +0200)]
Make Canvas a texture provider.

Change-Id: I8b5c9d8a5ed9ef9079eafb30ef0cb73786204ee6
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoAdded an example that shows how to consume texture providers from C++.
Gunnar Sletta [Fri, 22 Aug 2014 14:52:05 +0000 (16:52 +0200)]
Added an example that shows how to consume texture providers from C++.

And how to use use two textures in the same material.

Change-Id: Idcc618ed359422c2a104eeed105b7c4f5086ee4e
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoClamp QQuickItem::opacity to [0,1].
Gunnar Sletta [Fri, 22 Aug 2014 06:59:15 +0000 (08:59 +0200)]
Clamp QQuickItem::opacity to [0,1].

This was an oversight the the implementation of
setOpacity. QSGOpacityNode already does the right thing.

[ChangeLog][QtQuick][Item] When Item.opacity is set to a value outside
the range of 0 to 1, it will be clamped.

Change-Id: Ib7f23c5d8860c76e009a25e5ab2c36db20301faf
Reviewed-by: Raine Mäkeläinen <raine.makelainen@gmail.com>
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
10 years agoDon't use d->instanceModel after free'ing it
Lars Knoll [Thu, 12 Jun 2014 08:11:09 +0000 (10:11 +0200)]
Don't use d->instanceModel after free'ing it

prevModel points to d->instanceModel and is being
used further down in the code. So reset the pointer
to 0 after freeing the old instanceModel.

Change-Id: I8854ae3e09c8b2fe50ad311f3dbc7b8ed26805e1
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoMark custom node in textureinthread dirty after rendering texture
Tasuku Suzuki [Sat, 16 Aug 2014 13:15:32 +0000 (22:15 +0900)]
Mark custom node in textureinthread dirty after rendering texture

Change-Id: I4401a6db18b1fcc69403062f3f4775d3b62dfd3e
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
10 years agoFix QML2 hang on gcc 4.6.3 armhf
Pelle Johnsen [Wed, 20 Aug 2014 10:06:10 +0000 (12:06 +0200)]
Fix QML2 hang on gcc 4.6.3 armhf

With gcc 4.6.3 armhf (defualt for Ubuntu 12.04) some optimization bug
results in QML2 v4 compiler hang during type inference.

Task-number: QTBUG-40364
Change-Id: Iea1a8be3b5a7d9410304110d89dae3735339cb72
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
10 years agoQSM: Reintroduce guard argument evaluation
Sebastian Sauer [Tue, 12 Aug 2014 11:53:00 +0000 (18:53 +0700)]
QSM: Reintroduce guard argument evaluation

Implements the suggestion from Simon Hausmann (codereview 89716
from 08-05 14:46) to use QQmlScriptString rather then the previous
used MetaObject-manipulation.

This also introduces comparison operators for QQmlScriptString
to be able to determinate if a QQmlScriptString changed what
is needed cause there is otherwise no way to access (all) the
needed details within QQmlScriptStringPrivate.

Change-Id: I198479eac8fd37cbdd98a99aacdd8eebf7b75d21
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoFix crash with early QObject property access
Simon Hausmann [Thu, 21 Aug 2014 11:10:33 +0000 (13:10 +0200)]
Fix crash with early QObject property access

In the reported bug, it can happen that we try to access the compile-time resolved
QObject property of an object that is referenced by id. The binding that uses this is
triggered when the property changes but _also_ when the id referenced object gets either
created or deleted. The first time the binding is evaluated is very early on, when the
id referenced object is not created yet, so the binding evaluation fails. However the
dependency is set up, and so later then the id referenced object is created and the id
property is set on the context, the notification triggers and the binding is re-evaluated.
During that binding evaluation a QObject property access happens by index on an object that
doesn't have its VME meta-object set up yet. Therefore the property access fails and a
crash occurs or the Q_ASSERT(property) assertion fails.

The fix is to set register the id named object in the context _after_ the VME meta-object is
setup.

Task-number: QTBUG-40018
Change-Id: Ic2d7b4a0c49635efe68e93f2f6c316eb65f0c309
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoFix typo in DelegateModelGroup documentation
Albert Astals Cid [Thu, 21 Aug 2014 13:39:56 +0000 (15:39 +0200)]
Fix typo in DelegateModelGroup documentation

Change-Id: Ic01f0935c469f85f32699aebaeb1fc6f8b2279fb
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
10 years agoRemove references transforms have to items in QQuickItem's destructor.
Mitch Curtis [Fri, 22 Aug 2014 07:52:59 +0000 (09:52 +0200)]
Remove references transforms have to items in QQuickItem's destructor.

In case they try to remove themselves from our list of transforms when
that list has already been destroyed after ~QQuickItem() has run.

Task-number: QTBUG-40877
Change-Id: Ie57f5dd1e8b791846f08629183974c771553c4bf
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
10 years agoProtect some members in QQmlObjectCreator
Lars Knoll [Mon, 18 Aug 2014 10:38:24 +0000 (12:38 +0200)]
Protect some members in QQmlObjectCreator

Avoid dangling pointers when nested incubators are being used.

Task-number: QTBUG-40437
Change-Id: I73922d2f373b2efbc00983305cdea9e8d60f0c41
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoUpdate license headers and add new licenses
Jani Heikkinen [Fri, 22 Aug 2014 06:13:59 +0000 (09:13 +0300)]
Update license headers and add new licenses

- Renamed LICENSE.LGPL to LICENSE.LGPLv21
- Added LICENSE.LGPLv3 & LICENSE.GPLv2
- Removed LICENSE.GPL

Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
10 years agoInitialize variable
Lars Knoll [Thu, 12 Jun 2014 08:19:12 +0000 (10:19 +0200)]
Initialize variable

Change-Id: Ia54dc43d22b8edaa49634c6a364f87b4a06d659d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoDon't abuse new to do a reinterpret_cast
Lars Knoll [Thu, 12 Jun 2014 08:52:32 +0000 (10:52 +0200)]
Don't abuse new to do a reinterpret_cast

Using new to do a reinterpret_cast is rather confusing.
Also protect the list model case against self-assignment
which could lead to memory corruption.

Change-Id: I10b81644d0004d4a50a5a74e5b8c58e27cbe6934
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoAdd const & to arguments
Albert Astals Cid [Thu, 21 Aug 2014 13:36:30 +0000 (15:36 +0200)]
Add const & to arguments

Change-Id: I1bcf69638fee32b6e6565b8ea828c0adcff48a67
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoMark QQuickFBO's node dirty after rendering the texture.
Gunnar Sletta [Fri, 15 Aug 2014 12:15:14 +0000 (14:15 +0200)]
Mark QQuickFBO's node dirty after rendering the texture.

It is impossible to use in a shader effect otherwise.

Change-Id: I489e6ae43cdc3fe8f54efa6d86ead4d21831b84d
Task-number: QTBUG-40809
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoIntroduce QQuickWindowQObjectCleanupJob.
Gunnar Sletta [Sat, 23 Aug 2014 12:13:05 +0000 (14:13 +0200)]
Introduce QQuickWindowQObjectCleanupJob.

Convenience for cleaning up texture providers. Private class for now,
we can maybe make it public in 5.5.

Change-Id: I3489fde2a268bc988634a16f87ee558b9ac5dba2
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoImprove the internal NodeVisitorEx API
Simon Hausmann [Wed, 13 Aug 2014 08:17:53 +0000 (10:17 +0200)]
Improve the internal NodeVisitorEx API

Allow the implementation of visit to control whether the children should be
processed afterwards or not. This is modelled after the JS AST visitor in
Qml.

Change-Id: I5b1adf5e1aefd8899bf444e993ddfbf2c5c125c9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoDownscale textures which exceed the GL texture limit
Gunnar Sletta [Fri, 15 Aug 2014 07:26:16 +0000 (09:26 +0200)]
Downscale textures which exceed the GL texture limit

This way they will at least render.

[ChangeLog][QtQuick] Images exceeding GL_MAX_TEXTURE_SIZE will be
downscaled to fit so they will still show.

Change-Id: I169ecac768036812b8e14265ec1a0a8902655666
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoProtect incubation against its creator being deleted.
Gunnar Sletta [Thu, 21 Aug 2014 09:59:03 +0000 (11:59 +0200)]
Protect incubation against its creator being deleted.

Change-Id: Ica7ed02c9b67243310ddce3feaf91935b699086d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoCleanup: Separate the sub-tree layering out of QtQuick into the scene graph
Simon Hausmann [Mon, 11 Aug 2014 11:21:11 +0000 (13:21 +0200)]
Cleanup: Separate the sub-tree layering out of QtQuick into the scene graph

This basically renames QQuickShaderEffectTexture to QSGDefaultLayer and
introduces QSGLayer as interface to be used. QQuickShaderEffectTexture is
generic for the scene graph and has no QtQuick dependencies. The interface
separation allows scene graph backends to customize layers.

Change-Id: I9a7f37addaa4b80a34ff9a1456b0cb9b16d4e9f3
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoIntrospect qrc files in FolderListModel.
Gatis Paeglis [Tue, 12 Aug 2014 12:46:05 +0000 (14:46 +0200)]
Introspect qrc files in FolderListModel.

And don't use "file watchers" for resource file paths,
otherwise it generates the following warning:

QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: No
such file or directory

Change-Id: I6b75c9195fb2b2ba7b3e0bb7d146fc5cd343927e
Task-number: QTBUG-40307
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
10 years agoAvoid creating fbo with zero size in QQuickWidget
Laszlo Agocs [Wed, 20 Aug 2014 14:52:38 +0000 (16:52 +0200)]
Avoid creating fbo with zero size in QQuickWidget

Get rid of incomplete attachment warnings on Android.

Change-Id: I7da546861b1814677b0c8ae110416f69bbbb7edc
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
10 years agoAdd 5.3.2 changelog for qtdeclarative
Alan Alpert [Wed, 20 Aug 2014 18:02:54 +0000 (11:02 -0700)]
Add 5.3.2 changelog for qtdeclarative

Change-Id: I33e8149ec9e2f7ecfebb7f55de0dbb291805be93
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoFix crash with recursively loading cached compilation units
Simon Hausmann [Tue, 24 Jun 2014 08:35:42 +0000 (10:35 +0200)]
Fix crash with recursively loading cached compilation units

When a cached compilation unit depends on an import that is implemented as a
Qml C++ plugin and that plugin in turn loads an asynchronous component that is
cached, we would get a crash in the typeloader and a failing assertion
(ASSERT: "d->m_mainThreadWaiting == false" in file qml/ftw/qqmlthread.cpp, line 300)

This is because we did not implement the asynchronous loading within the loader
thread for cached compilation units. This is simply done using a posted event,
using the same mechanism used for other async load methods.

Change-Id: Iefce67ab634ce26122c348dcdfc8e66b00fec671
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoCleanup: Remove ShaderEffectSourceNode
Simon Hausmann [Fri, 8 Aug 2014 14:33:58 +0000 (16:33 +0200)]
Cleanup: Remove ShaderEffectSourceNode

We can simply use a standard image node and do the dirty marking also
directly in the texture (both live in the same thread).

Change-Id: I7345c702613782adec3c6a36a7705a2a54ed82ec
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agov4: Enable primitive conversation to QQmlScriptString in javascript
Sebastian Sauer [Tue, 12 Aug 2014 11:52:50 +0000 (18:52 +0700)]
v4: Enable primitive conversation to QQmlScriptString in javascript

This makes following QML-code proper working:

ParentChange {
  x: 0
  Component.onCompleted: x = 10
}

where x is a QQmlScriptString.

Before this patch an error-message would be thrown that the
bool/int/string/etc cannot be converted to a QQmlScriptString.

With the patch primitive types including null and undefined are
proper converted to a QQmlScriptString. The patch ignores (as
in not implements) function/binding assignment.

Unfortunately since commit aa25ad8d5f4 its not possible any
longer to instanciate QQmlScriptString what means there is
otherwise no (easy) way to inject a QQmlScriptString from
within Javascript.

Change-Id: I18aac6a6e9a57f3b7d0a2d66cdab2be6c3c153c5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoFix memory corruption in shader materials.
Gunnar Sletta [Mon, 18 Aug 2014 07:31:08 +0000 (09:31 +0200)]
Fix memory corruption in shader materials.

Change ee616b3905106a3eedef9ee964ab283ef45c7dbc accidentally
removed the member variable used to refcount the attribute
names. This resulted in the names being deleted and the
stored const char *'s to become invalid. Add it back.

Change-Id: Ie33f75cd76085283a5ee685602e023bb3c42c896
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
10 years agoFix typo in StateChangeScript documentation.
Mitch Curtis [Mon, 18 Aug 2014 16:30:35 +0000 (18:30 +0200)]
Fix typo in StateChangeScript documentation.

Change-Id: Iec72331c183ea02680bad01f04eae82ebd815cdb
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoV4 IR: Add loop peeling.
Erik Verbruggen [Wed, 23 Jul 2014 10:22:11 +0000 (12:22 +0200)]
V4 IR: Add loop peeling.

By peeling the first iteration off of a loop and putting it in front of
the loop, type inference can deduce more type information for esp. loop
induction variables. To prevent increasing the code size too much, only
the inner-most loops are peeled.

This gives a 10% speed-up on crypto.js.

Change-Id: I57f9611695bc8defc0bff84e440b8a20b2c8a34e
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
10 years agoV4 IR: add immediate dominator re-calculation.
Erik Verbruggen [Wed, 23 Jul 2014 10:17:28 +0000 (12:17 +0200)]
V4 IR: add immediate dominator re-calculation.

When removing edges, the control-flow graph changes, so some immediate
dominators might need to be updated. This change collects all candidates
and processes them in a single batch.

Change-Id: I928f42232427a84bcb9658e314dadd0bd021b12f
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
10 years agoDoc: Removing url variable from qdocconf file.
Topi Reinio [Fri, 15 Aug 2014 11:10:55 +0000 (13:10 +0200)]
Doc: Removing url variable from qdocconf file.

-url inherited from the url variable set in qtbase/doc/global

Change-Id: I94a0da7aa98af1fdd6140168fe9feb27b11c0bdb
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
10 years agoFix setContextObject to re-evaluate bindings
Alex Montgomery [Fri, 15 Aug 2014 16:41:56 +0000 (09:41 -0700)]
Fix setContextObject to re-evaluate bindings

Fix QQmlContext::setContextObject to reevaluate bindings as the
documentation says that it should.

Task-number: QTBUG-40798
Change-Id: Ifbd97c7a07a5432f4948937da863370b05705206
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoFix cursorShape with QQuickWidget
Laszlo Agocs [Thu, 14 Aug 2014 11:34:30 +0000 (13:34 +0200)]
Fix cursorShape with QQuickWidget

Task-number: QTBUG-40729
Change-Id: If3b2f8ca8795da1ac7c626db9c872f735d1e7b5d
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
10 years agoAdded the QtSQL dependency info. to the project file
Venu [Wed, 13 Aug 2014 14:26:32 +0000 (16:26 +0200)]
Added the QtSQL dependency info. to the project file

Without this information the app fails to find the plugin
required to load the QtQuick.LocalStorage module on Android.

Task-number: QTBUG-37203
Change-Id: I245012e78ab8d1fe3205e08939f4baec58c20759
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
10 years agoCleanup
Simon Hausmann [Wed, 6 Aug 2014 12:59:34 +0000 (14:59 +0200)]
Cleanup

Merge QV4::CompiledData::QmlUnit into QV4::CompiledData::Unit. For pure JS
units it means a slight increase of memory usage by a few bytes, but overall it
makes the code a lot simpler.

Change-Id: Ib48927749720b056f004aac0fe22cb8ec729e3f6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agotst_dialogs: verify that rootObject is valid
Robin Burchell [Mon, 11 Aug 2014 09:23:42 +0000 (11:23 +0200)]
tst_dialogs: verify that rootObject is valid

if there's an error during loading, it's much easier to spot if this fails
rather than crashes.

Change-Id: If0106729e18768819da8a877959a095398af8547
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
10 years agotst_dialogs: QTRY_ on the expression (spyVisibilityChanged.count) not the variable.
Robin Burchell [Mon, 11 Aug 2014 09:23:47 +0000 (11:23 +0200)]
tst_dialogs: QTRY_ on the expression (spyVisibilityChanged.count) not the variable.

We only assign to the variable once, so the value may not change in time.

Change-Id: I54ac7faad60d3984bfde4606aaf7e30a2340ba3e
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
10 years agoThe cached objects can be deleted, so keep them in a QPointer.
Gunnar Sletta [Thu, 14 Aug 2014 11:53:11 +0000 (13:53 +0200)]
The cached objects can be deleted, so keep them in a QPointer.

Change-Id: Ieaebd2e7b9823cbe22efc331e42ceab8fbbda0e8
Task-number: QTBUG-40201
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoFix flicker when showing QQuickWidget
Laszlo Agocs [Thu, 14 Aug 2014 10:58:55 +0000 (12:58 +0200)]
Fix flicker when showing QQuickWidget

This also reintroduces the change from commit 14b4747b17d522fe57f3a5f21738c5a89323b5e2.
Due to some bizarre merge issue that change has disappeared from qquickwidget.cpp
and its history. It is there in the main log, though.

The new fix depends on this older one, so the combined one fixes the following
three issues:

1. Polish and sync cannot be skipped when we are rendering for the first time.

2. Recreating the fbo twice when the widget is shown. Calling
createFramebufferObject() is not necessary in this case since createContext()
will trigger this anyhow due to scenegraphInitialized().

3. Avoid recreating the fbo when the size is the same as before. Some platforms
are keen on sending resize events with the same size. These should be ignored.
What's worse, some platforms (cocoa) generate a resize on exitting (Cmd-Q)
and not ignoring the resize at that stage is dangerous since the scenegraph
is already invalidated.

Task-number: QTBUG-40710
Task-number: QTBUG-40505
Change-Id: I2e897acc68fa68233563a1db63ffb6c5d0baad73
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoV4 JIT: fix int32 to double conversion code
Erik Verbruggen [Thu, 14 Aug 2014 08:56:54 +0000 (10:56 +0200)]
V4 JIT: fix int32 to double conversion code

Missing else: two (nearly identical) conversions would get generated.

Change-Id: I745120f81d42bf28fbce7ab6a62da909a8e14458
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoV4 JIT: add d8-d15 as available FP registers on ARM.
Erik Verbruggen [Fri, 8 Aug 2014 13:36:37 +0000 (15:36 +0200)]
V4 JIT: add d8-d15 as available FP registers on ARM.

VFP3-d16 is the minimum implementation available on ARMv7, so these
registers are also always available. The big added bonus is that they
are callee saved, so using them will result in less loads/stores for
doubles.

Change-Id: I0cab3fe24d8677315b4c7d9449d8619cbf9a2919
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoV4 JIT: support saving used callee saved FP registers.
Erik Verbruggen [Tue, 12 Aug 2014 14:28:49 +0000 (16:28 +0200)]
V4 JIT: support saving used callee saved FP registers.

This is not used yet by any platform/abi we support, because we do not
define any callee-saved FP registers. Yet.

Change-Id: I5857a452456175398c5e9681ff33800b9431b9da
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoV4 JIT: calculate used registers and only save those.
Erik Verbruggen [Tue, 12 Aug 2014 12:30:42 +0000 (14:30 +0200)]
V4 JIT: calculate used registers and only save those.

Instead of saving all possibly used ones. Note that floating point
registers are not saved yet, as we don't support callee-saved FP
registers yet.

Change-Id: I1db2ba2513f7b466c64ec103eda0c464269247b0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoV4 JIT: parameterize the prologue and epilogue generation
Erik Verbruggen [Tue, 12 Aug 2014 07:40:11 +0000 (09:40 +0200)]
V4 JIT: parameterize the prologue and epilogue generation

... with the regular (non-FP) registers that need to be saved. This
patch shouldn't change any of the JIT generated code, because all
regular callee saved registers are passed in.

Change-Id: Id11b8f37f06d80e8015ac6f0d0ccefdfa3342cbe
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoPropagate the accepted flag back in QQuickWidget mouse handlers
Laszlo Agocs [Thu, 14 Aug 2014 12:08:34 +0000 (14:08 +0200)]
Propagate the accepted flag back in QQuickWidget mouse handlers

Task-number: QTBUG-40784
Change-Id: Ieff4b38358f241aebeb16ec877e05179b01cc004
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoQQuickWidget: resolve samples also when rendering is triggered from resize
Laszlo Agocs [Tue, 12 Aug 2014 09:58:58 +0000 (11:58 +0200)]
QQuickWidget: resolve samples also when rendering is triggered from resize

The normal update path did the resolving properly. However when we re-render
due to a resize, it was not done at all.

Change-Id: I3d55be111a4338e8f3dbb1081972f47daca53b35
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoMerge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4
Frederik Gladhorn [Thu, 14 Aug 2014 09:37:06 +0000 (11:37 +0200)]
Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4

10 years agoMerge remote-tracking branch 'origin/5.3' into 5.4
Frederik Gladhorn [Thu, 14 Aug 2014 09:35:11 +0000 (11:35 +0200)]
Merge remote-tracking branch 'origin/5.3' into 5.4

Change-Id: I2e06c2fcd8aa9d5d090f0568be75272ec82f7b20

10 years agoFix potential deadlook in threaded renderloop.
Gunnar Sletta [Thu, 14 Aug 2014 06:38:12 +0000 (06:38 +0000)]
Fix potential deadlook in threaded renderloop.

Change-Id: I415e632aa4e584c8fca745581f25a676db0eae42
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
10 years agoReinitialize in QQuickWidget properly after hide and show
Laszlo Agocs [Tue, 12 Aug 2014 08:10:30 +0000 (10:10 +0200)]
Reinitialize in QQuickWidget properly after hide and show

hide() followed by a show() results in totally broken QQuickWidgets due
to not initializing scenegraph again.

Task-number: QTBUG-40710
Change-Id: Id3cded2917d20c165b5885f3f2195d5c4566de89
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoAdded a signal handler
Venu [Wed, 13 Aug 2014 12:35:20 +0000 (14:35 +0200)]
Added a signal handler

Without the onHeightChanged signal handler the transition
of the NumberPad from left to right is incomplete especially
on a mobile device where the window is scaled to fit the view.
So the NumberPad ends up hidden behind the Display.

Task-number: QTBUG-36086
Change-Id: Iab021c9f2572a4ac83bc393dddc24ddd31849cb4
Reviewed-by: Niels Weber <niels.weber@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
10 years agoFix typo in Context2D documentation.
Mitch Curtis [Tue, 12 Aug 2014 13:10:36 +0000 (15:10 +0200)]
Fix typo in Context2D documentation.

Change-Id: Ib6e2436ba383a2caf78ac359883338016c2b7668
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
10 years agoSilence unused parameter warning in release builds.
Erik Verbruggen [Mon, 4 Aug 2014 11:24:57 +0000 (13:24 +0200)]
Silence unused parameter warning in release builds.

Change-Id: I02e5dd0bf511056c876c4e418334cad96657703e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoV4 JIT: fix stack use below stack pointer
Erik Verbruggen [Tue, 5 Aug 2014 08:51:57 +0000 (10:51 +0200)]
V4 JIT: fix stack use below stack pointer

When storing a double value returned from a function call on platforms
where the value wouldn't fit in a register, we used to store it on the
stack and then load it into a FP register. This stack use was done
without first lowering the stack pointer.

For x86 and ARM, the value is loaded directly into the FP register, and
for other non-64-bit platforms it correctly allocates the stack slot.

Change-Id: Idbc260038958a036ac2a7383d845199626decc8e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoIgnore extra arguments passed to Context2D functions.
Mitch Curtis [Mon, 11 Aug 2014 14:41:02 +0000 (16:41 +0200)]
Ignore extra arguments passed to Context2D functions.

This is in line with what Chrome, Firefox and IE do.

This is also how most JavaScript functions in Qt behave by default
(for example, TableView::resizeColumnsToContents()).

Task-number: QTBUG-40703
Change-Id: I087221e305dcb5fd6709ad4a99a5163d641faac6
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoDisable threaded FBO canvas drawing when not supported.
Gunnar Sletta [Tue, 12 Aug 2014 13:06:04 +0000 (15:06 +0200)]
Disable threaded FBO canvas drawing when not supported.

Change-Id: I1e8300c61ba31a5400fc43f85a9c39d2245b4518
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
10 years agoCreate rectangle nodes in the text editing through the context
Lars Knoll [Fri, 8 Aug 2014 18:29:19 +0000 (20:29 +0200)]
Create rectangle nodes in the text editing through the context

Unfortunately we can't re-use the QSGSimpleRectNode, as it doesn't provide us
with virtual methods to move it's creation into the context. But's since it's
only 20 lines of code anyway, this is still a nice cleanup. And it also allows
the re-use of any optimizations in the renderer for QSGRectangleNode.

Change-Id: I957777fbbeb0a994a9c257baf3bfe87fce8cc9e8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoAdd QQuickWidget::setClearColor()
Laszlo Agocs [Thu, 24 Jul 2014 08:23:12 +0000 (10:23 +0200)]
Add QQuickWidget::setClearColor()

And make qquickviewcomparison able to demonstrate how to create a
partially transparent QQuickWidget.

Avoid also recreating the QQuickView/QQuickWidget multiple times
when switching between the radio buttons.

[ChangeLog] Added QQuickWidget::setClearColor() in order to support
semi-transparent QQuickWidgets.

Change-Id: I319ad4afbe909530274d09f2a7fcff23730d6ebd
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
10 years agoV4 IR: change IR printing to be more readable.
Erik Verbruggen [Tue, 5 Aug 2014 12:11:16 +0000 (14:11 +0200)]
V4 IR: change IR printing to be more readable.

New structure:
- "comments" now start with a semi-colon, and have a list of key: values.
    ; predecessors: L17 L26 L36, loop_header: yes
    ; line: 30, column: 3

- when a temporary has a known type, it is written in front of the
  teporary when it is being assigned, and not repeated.
    var %109 = this
    double %42 = 42

- an expression starts with the operation, followed by the operands that
  are separated by commas. The type of the operands is the type
  mentioned when they are assigned.
    int32 %115 = sub %184, %185
    if gt %27, 0 goto L40 else goto L41

- conversions do mention the operand type in order to make them easier
  to read.
    double %178 = convert var to double %60

- phi node operands are prefixed by the from-label to make it easy to
  match those operands with the from-block.
    double %62 = phi L35: %58, L34: %61

- all names except for "this" and built-ins are prefixed by a dot in
  order to make it clear that a lookup will occur, just like member
  accesses.
    $6 = call .int2char($0)
    %7 = this
    %8 = %7.toString()

Change-Id: I9f626a91f97ca7c3f27e01a5539f3c4fc10a46b4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoV4 RegAlloc: fix callee saved register range handling
Erik Verbruggen [Fri, 8 Aug 2014 14:05:54 +0000 (16:05 +0200)]
V4 RegAlloc: fix callee saved register range handling

This makes sure that the index of the fixed(FP)RegisterRanges matches
the indexes for normal-/fpRegisters, because this index is used to check
if a chosen register intersects with a fixed (= caller saved) register
at call sites.

Change-Id: Ie31554dbe8ed99cb38ca6b2506da663be41d82f6
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoDoc: fixed a broken table
Leena Miettinen [Wed, 13 Aug 2014 09:04:41 +0000 (11:04 +0200)]
Doc: fixed a broken table

In "Importing QML Document Directories" by
adding a missing \row command.

Change-Id: Ie98ee34b2f66472b0ca692d2acdea870247448a0
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
10 years agoV4 JIT: fix JS stack frame size calculation.
Erik Verbruggen [Tue, 12 Aug 2014 14:56:39 +0000 (16:56 +0200)]
V4 JIT: fix JS stack frame size calculation.

StackLayout::calculateJSStackFrameSize now returns the size in number
of QV4::Value items, instead of bytes. The value is then multiplied in
the assembler by sizeof(Value) to get the number of bytes. Previously,
the return value was number of bytes, which also got multiplied.

A direct effect is that the JS stack size will be ~87% smaller, with
the nice effect that the GC will run faster (less roots on the stack).
It also won't retain objects whose reference accidentally ended up on
the stack below the used portion for the current function, so possibly
freeing (more) objects (earlier) than before.

Change-Id: Idd5a9c173e641c03e6b8a6fe743e403eda34dfe0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoAvoid qmake warnings about wrong includes
Laszlo Agocs [Wed, 13 Aug 2014 08:23:04 +0000 (10:23 +0200)]
Avoid qmake warnings about wrong includes

QtQuick: WARNING: qquickwindow.h includes qqml.h
when it should include QtQml/qqml.h
QtQuick: WARNING: qsgabstractrenderer.h includes qsgnode.h
when it should include QtQuick/qsgnode.h

Change-Id: I3b9dc20de54ef775c562b2c6b80184a7b3149586
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
10 years agoItemView: use categorized logging for delegate lifecycle
Shawn Rutledge [Tue, 12 Aug 2014 11:42:19 +0000 (13:42 +0200)]
ItemView: use categorized logging for delegate lifecycle

It becomes configurable at runtime instead of having to uncomment
and recompile.

Change-Id: I2c6f24c89f7e6fe1a9a77b948cdac6f2994680bf
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
10 years agoV4 RegAlloc: fix use position calculation for phi node arguments.
Erik Verbruggen [Mon, 11 Aug 2014 11:20:07 +0000 (13:20 +0200)]
V4 RegAlloc: fix use position calculation for phi node arguments.

The correct calculation was already done, but the value was discarded.

Change-Id: I600aeb9414736a3b7924a4a607233ab9bf6c02b6
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoV4 JIT: tweak generated int32 to double conversion code
Erik Verbruggen [Thu, 7 Aug 2014 12:33:55 +0000 (14:33 +0200)]
V4 JIT: tweak generated int32 to double conversion code

If the target is a FP register, and the source is a memory address, do
not load the int32 ourselves, but leave it to the assembler to decide
what to do. On x86(_64) this is generates a single instruction, while on
ARM the assembler will insert a load on its own.

For the case where the target is not a FP register, use the return value
register as base register for the target address. The advantage is that
the address calculation is now independent of the preceding conversion,
so it can fit in a different pipeline without dependencies.

Change-Id: Ib7cefa636274ba8596e4d11ae0170a091a0def3e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoRemove QQuickWindow::glslVersion & glslIsCoreProfile
J-P Nurmi [Sun, 10 Aug 2014 10:22:56 +0000 (12:22 +0200)]
Remove QQuickWindow::glslVersion & glslIsCoreProfile

Superceded by the OpenGLInfo attached type
=> remove the API before it gets released

Change-Id: I7511fd28eb375eb3cd3cdd4bda6d82c1883e3094
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
10 years agoFix the nine patch node factory function (part 2)
Simon Hausmann [Sat, 9 Aug 2014 07:28:10 +0000 (09:28 +0200)]
Fix the nine patch node factory function (part 2)

Change-Id: I9edb6b0052d3b02cc412f56ae73e02652af0c93c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoMerge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4
Simon Hausmann [Tue, 12 Aug 2014 10:34:35 +0000 (12:34 +0200)]
Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4

10 years agoCorrect strokeRect documentation.
Mitch Curtis [Tue, 12 Aug 2014 09:36:26 +0000 (11:36 +0200)]
Correct strokeRect documentation.

Change-Id: I81c61f3b32819e45e15b2be472e71e48fac0c148
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
10 years agoV4 JIT: generate code for int32 comparisons.
Erik Verbruggen [Tue, 22 Jul 2014 09:56:33 +0000 (11:56 +0200)]
V4 JIT: generate code for int32 comparisons.

Change-Id: I5e88fb3df7b01f4f515ce4d2e451a5a6f5ba92ad
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoSilence harmless compiler warning.
Gunnar Sletta [Mon, 11 Aug 2014 12:30:35 +0000 (14:30 +0200)]
Silence harmless compiler warning.

AlignJustify is not a tested value, but the compiler warning
can throw you off, so best to keep it quiet.

Change-Id: I0b3d717dfe2c11fc4367e7eceb5b83009c4e0a30
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
10 years agoDoc: Add a keyword for XMLHttpRequest
Topi Reinio [Tue, 12 Aug 2014 08:52:42 +0000 (10:52 +0200)]
Doc: Add a keyword for XMLHttpRequest

To make the search term 'XMLHttpRequest' return relevant results in
the Assistant, add a keyword for it.

Task-number: QTBUG-40240
Change-Id: I44b0d397cd014d2468e6302d4293c959ec8c8802
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
10 years agobenchmarks: Skip compilation of (and mark with FIXME) a few benchmarks that don't...
Robin Burchell [Mon, 11 Aug 2014 10:41:00 +0000 (12:41 +0200)]
benchmarks: Skip compilation of (and mark with FIXME) a few benchmarks that don't build.

Change-Id: I4d2e9bf3a520636c568a6b58e311994693446c97
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agobenchmarks/particles: fix projects to actually build
Robin Burchell [Mon, 11 Aug 2014 10:35:47 +0000 (12:35 +0200)]
benchmarks/particles: fix projects to actually build

Change-Id: I3edb05279119b921b50a0329dfd47f0ff2cdb9bc
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoFix compilation of tst_compilation (:-P) benchmark.
Robin Burchell [Mon, 11 Aug 2014 10:13:46 +0000 (12:13 +0200)]
Fix compilation of tst_compilation (:-P) benchmark.

Change-Id: I7bbf24d816a356f100d7e2c5a8e7a81218f0f54d
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoDoc: Remove duplicated words
Topi Reinio [Mon, 11 Aug 2014 13:34:21 +0000 (15:34 +0200)]
Doc: Remove duplicated words

Removes duplicated (repeated) words and fixes other minor
documentation issues.

Change-Id: I891f2b3e60194b207737425c1dcc1d35a5bd921a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
10 years agoV4 JIT: fix LookupCall on ARM
Erik Verbruggen [Mon, 11 Aug 2014 11:15:34 +0000 (13:15 +0200)]
V4 JIT: fix LookupCall on ARM

To generate a LookupCall, the register r8 was used on ARM instead of the
ReturnValue register. The reason is that the ReturnValue register is
also the register for the first argument. However, now that we use
callee-saved registers (r8 among them), this would clobber any value
stored in r8. The fix is to actually use r0 to calculate the value,
because the first argument holds the lookup table, and the call is
relative to that. This leaves r8 free to be used by the register
allocator.

Change-Id: I5095bf69d27e16111ad32d9e5d5691c7bce14516
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoRemove Item.window
Alan Alpert [Thu, 7 Aug 2014 04:18:45 +0000 (21:18 -0700)]
Remove Item.window

Window is a type in a different import, so we can't just casually use
it in Item. Note that this API was going to be new in the next release,
so it can be safely removed (at least until we do it right).

Change-Id: I9e3eb5f65ea5f46d30fb7905d0f9c479daaccbff
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
10 years agoWrite memory events into tracefiles generated by qmlprofiler
Ulf Hermann [Mon, 16 Jun 2014 11:33:33 +0000 (13:33 +0200)]
Write memory events into tracefiles generated by qmlprofiler

Change-Id: Ic01505194f29967ed1aad16fe36e14dc5532ae25
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoMerge remote-tracking branch 'origin/5.3' into 5.4
Simon Hausmann [Tue, 12 Aug 2014 08:03:53 +0000 (10:03 +0200)]
Merge remote-tracking branch 'origin/5.3' into 5.4

Conflicts:
src/qml/jsruntime/qv4include.cpp
src/quick/items/qquickrendercontrol.cpp
src/quick/items/qquickrendercontrol_p.h
src/quickwidgets/qquickwidget.cpp

Change-Id: Ib2dc0051a38cd283a37a7665eb4a76f6f7ec8b15

10 years agoV4 JIT: tune generated instructions for inplace binops
Erik Verbruggen [Fri, 27 Jun 2014 12:37:50 +0000 (14:37 +0200)]
V4 JIT: tune generated instructions for inplace binops

Generate better code for in-place binary operations where the right-hand
side is either a constant or a memory address. Now that the JIT can do
this, also tell the register allocator not to un-spill that right-hand
side.

Change-Id: I0ab852f6b92f90dfed99c05fbaf91aad2549ecf4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoFix the nine patch node factory function (part 1)
Simon Hausmann [Sat, 9 Aug 2014 07:27:42 +0000 (09:27 +0200)]
Fix the nine patch node factory function (part 1)

Change-Id: I5981190dd43082715a7159efd478469365caf3a6
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoAdd more complete comparison function to QQuickShaderEffectMaterial.
Michael Brasser [Fri, 8 Aug 2014 15:57:46 +0000 (10:57 -0500)]
Add more complete comparison function to QQuickShaderEffectMaterial.

Task-number: QTBUG-37914
Change-Id: I3646991a9a7e43dcc5681fca0d8a5e24c9a427bd
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoAdd OpenGLInfo attached type
J-P Nurmi [Sat, 9 Aug 2014 21:42:20 +0000 (23:42 +0200)]
Add OpenGLInfo attached type

[ChangeLog][QtQuick] Introduced OpenGLInfo attached type that
provides information about the currently used OpenGL version.

Change-Id: Ibdf365decf9d6331cf91c0bf541e493ced02a417
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoFinish render() support for QQuickWidget
Laszlo Agocs [Thu, 7 Aug 2014 13:41:58 +0000 (15:41 +0200)]
Finish render() support for QQuickWidget

The enablers are already in. Now we just need to use the virtual in
QQuickWidgetPrivate and test it.

Task-number: QTBUG-39562
Change-Id: I1faf5a0a244ba4169fb8f9b0dae657304038b60e
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoRemove setDefaultFormat() from QQuickWindow
Laszlo Agocs [Thu, 7 Aug 2014 15:19:50 +0000 (17:19 +0200)]
Remove setDefaultFormat() from QQuickWindow

Replaced by QSurfaceFormat::setDefaultFormat().

Change-Id: If4e37b75ccb55d556d80b0079be89e5a521f6dbb
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoAvoid double deletion when deleting an incubating component.
Martin Jones [Sat, 9 Aug 2014 12:01:08 +0000 (22:01 +1000)]
Avoid double deletion when deleting an incubating component.

The guard in QQmlIncubatorPrivate::clear() was invalidated by clearing
the guards in QQmlIncubatorPrivate::incubate() when a deletion was
detected.

If we detect a deletion, leave the guards in place, to be handled in
QQmlIncubatorPrivate::clear().

Task-number: QTBUG-40685
Change-Id: I1bf7422fda97745f1f7a3b42285a399244c09a1f
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoAdded interface for the QStyle rendering in QtQuick Controls
Simon Hausmann [Fri, 8 Aug 2014 14:33:14 +0000 (16:33 +0200)]
Added interface for the QStyle rendering in QtQuick Controls

This allows a scene graph backend to customize the style rendering

Change-Id: I6048df47ed3705d81140d63a21257f704a0e0a82
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoProtect against crashes with invalid openglContext()
Simon Hausmann [Fri, 8 Aug 2014 11:00:45 +0000 (13:00 +0200)]
Protect against crashes with invalid openglContext()

1) Don't fail the assertion in the animator jobs if we don't have a context
2) Delegate the opengl context check in QQuickWindow::createTextureFromImage
   to the QSGContext

Change-Id: I1b248895dcd6db406f1af8866fd0052dd7564899
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoImprove support for node iteration in the internal API
Simon Hausmann [Fri, 8 Aug 2014 10:10:44 +0000 (12:10 +0200)]
Improve support for node iteration in the internal API

Added a new node visitor that allows easier traversal of the specialized
node types such as the image or rectangle nodes.

Change-Id: I45a7d3e1513b4a4db9d07998a6bcee9eba34044e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoCleanup: Remove remainders of dirty state usage
Simon Hausmann [Fri, 8 Aug 2014 08:43:27 +0000 (10:43 +0200)]
Cleanup: Remove remainders of dirty state usage

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