platform/upstream/qtdeclarative.git
11 years agoCompile imported scripts in the loader thread
Simon Hausmann [Sun, 29 Sep 2013 19:20:09 +0000 (21:20 +0200)]
Compile imported scripts in the loader thread

This has the benefit of blocking the GUI thread less and speeding up type
creation in the GUI thread (for types that import js libraries).

This patch also brings one behavioral change: Due to the parsing at type
instantiation type, things like syntax errors for script imports would only
generate a run-time warning and the code in the QML file would just see
"undefined". Errors in the script now generate real errors at component
compilation time, meaning the errors come out earlier and as real errors.

This patch implements the separation for the VME only (to keep the size
of this patch small).

Change-Id: I82f7f3a2d3d4524ea12a7ab62abd8640aba6a47f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoV4 IR: do type inference/propagation before optimization.
Erik Verbruggen [Fri, 27 Sep 2013 16:44:09 +0000 (18:44 +0200)]
V4 IR: do type inference/propagation before optimization.

This gives slightly better results for inplace increment/decrement,
where the operand has to be converted to a number. When that operand is
known to be a number, this conversion can be removed. By doing the
optimizations after typing, these conversions will not only turn into
assignments, but they will be propagated through the IR. That saves
a copy/move, which, in turn, will lighten the work for the register
allocator and the instruction selection.

Change-Id: If76575a71fbcb2d810b94060e61b4364bdaaa065
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoV4: remove inplace operations
Erik Verbruggen [Thu, 26 Sep 2013 12:49:44 +0000 (14:49 +0200)]
V4: remove inplace operations

Inplace operations are expanded when building the IR, so the neither the
IR, nor the instruction selection backends or runtime need to handle
them.

Change-Id: Id01f9544e137dd52364cf2ed2c10931c31ddfff3
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoV4: changed environment variable SHOW_CODE.
Erik Verbruggen [Thu, 26 Sep 2013 08:25:22 +0000 (10:25 +0200)]
V4: changed environment variable SHOW_CODE.

Use QV4_SHOW_ASM for the generated assembly from the JIT, and use
QV4_SHOW_IR to get dumps of the IR.

Change-Id: Id85d3d6c87b47088c312475a7c737d54c58c7791
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix license headers of QtQuick sources.
Gunnar Sletta [Mon, 30 Sep 2013 05:28:31 +0000 (07:28 +0200)]
Fix license headers of QtQuick sources.

Change-Id: I3750c47640bf21c3567c5fa1c4667e3e2552942e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoRemove debug output from tst_qqmlprofilerservice.
Gunnar Sletta [Mon, 30 Sep 2013 05:50:33 +0000 (07:50 +0200)]
Remove debug output from tst_qqmlprofilerservice.

I suspect this got snuck in accidentally.

Change-Id: I4684bf333a19e6c760ea499b751d51be34f51c6f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoRemove some uses of raw Object pointers
Lars Knoll [Fri, 27 Sep 2013 15:04:42 +0000 (17:04 +0200)]
Remove some uses of raw Object pointers

Change-Id: I7c715f33d197ebbf6f0c00040099b27ed7221d42
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoremove more uses of QV4::Value
Lars Knoll [Fri, 27 Sep 2013 14:15:38 +0000 (16:15 +0200)]
remove more uses of QV4::Value

Change-Id: I11b0b2b7626297e2c98dc77784574da4b59ba8cf
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove most uses of Value from qml/qml
Lars Knoll [Fri, 27 Sep 2013 07:45:55 +0000 (09:45 +0200)]
Remove most uses of Value from qml/qml

Change-Id: I409a8505a9e01f86d777bc694d24516d1c8f0c4d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove some more QV4::Value usages
Lars Knoll [Fri, 27 Sep 2013 06:32:44 +0000 (08:32 +0200)]
Remove some more QV4::Value usages

Change-Id: Ic146a964f2ff6b90eeceda90bf1834d7212386a5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove more occurrences of QV4::Value
Lars Knoll [Thu, 26 Sep 2013 20:07:27 +0000 (22:07 +0200)]
Remove more occurrences of QV4::Value

Change-Id: I66c370680d7e6bee2e73a7a940aa96ab4009ec57
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix colorization of native rendered text...
Gunnar Sletta [Fri, 27 Sep 2013 13:31:12 +0000 (15:31 +0200)]
Fix colorization of native rendered text...

Task-number: QTBUG-33633

Change-Id: Ic7fabe36887fc19e28286ae6f4eb2f22b4211b4f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
11 years agoV4 regalloc: fix the case where too few regs are available.
Erik Verbruggen [Wed, 25 Sep 2013 10:11:14 +0000 (12:11 +0200)]
V4 regalloc: fix the case where too few regs are available.

When all registers are allocated, and a new range gets active, some
other range will have to be split and spilled to the stack. This gets
slightly more complicated when the temporary is defined by a phi-node,
so in that case, the temporary is immediately spilled.

Change-Id: Iaab8b8e88849866e5841ae752377796e8540e30f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoV4 JIT: optimize constant-to-register loading.
Erik Verbruggen [Wed, 25 Sep 2013 09:58:03 +0000 (11:58 +0200)]
V4 JIT: optimize constant-to-register loading.

Change-Id: I02e3cdd5f9a68fbf6bfd7805c385d807b344155b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoV4 JIT: optimize mem2mem copies.
Erik Verbruggen [Tue, 24 Sep 2013 09:42:03 +0000 (11:42 +0200)]
V4 JIT: optimize mem2mem copies.

Instead of loading and decoding a value and then encoding and storing
it, we can just as well fold that into a load+store.

Change-Id: I84c8eb310510a91cefe2cbc0d4bb01856b41663d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoStabilize and speed up test
Lars Knoll [Fri, 27 Sep 2013 12:03:36 +0000 (14:03 +0200)]
Stabilize and speed up test

Added lots of missing qWaitForWindowExposed(), and
sped up animations.

Change-Id: Ie3c5e53dc9e9770baa05fb1da3eedce80ac52d31
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix crash in tst_qmltest with the new animators.
Gunnar Sletta [Sat, 28 Sep 2013 13:37:43 +0000 (15:37 +0200)]
Fix crash in tst_qmltest with the new animators.

If the target of a job was deleted while it was running we need
to avoid any operations on that job.

Task-number: QTBUG-33723
Change-Id: Ia86856e7f32465f58e25c87f9c74c99b7cb0caea
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoqmlimportscanner: Fix braces.
Friedemann Kleint [Wed, 25 Sep 2013 14:26:42 +0000 (16:26 +0200)]
qmlimportscanner: Fix braces.

Change-Id: I1361bc1f10b04d0001a1d02b45033ca2c82f8105
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
11 years agoqmlimportscanner: Use iostream for output consistently.
Friedemann Kleint [Wed, 25 Sep 2013 14:21:38 +0000 (16:21 +0200)]
qmlimportscanner: Use iostream for output consistently.

host-built tools should not use <QDebug>.

Change-Id: I2c69c79c138689d22f4979e268313fb461a8053a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
11 years agoqmlimportcanner: Compile with QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII.
Friedemann Kleint [Wed, 25 Sep 2013 14:13:27 +0000 (16:13 +0200)]
qmlimportcanner: Compile with QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII.

Clean up single character string constants and string usage.

Change-Id: I242110d57beeb100155757bda170ade479fcb242
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
11 years agoMark qmltest as insignificant to get CI to pass again
Lars Knoll [Sat, 28 Sep 2013 08:46:33 +0000 (10:46 +0200)]
Mark qmltest as insignificant to get CI to pass again

The animator tests keep crashing randomly.

Change-Id: I0d4b177238fc915931c3503b03e29f433ebf4950
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoTry to stabilize the multipleTransitions test
Lars Knoll [Sat, 28 Sep 2013 08:37:10 +0000 (10:37 +0200)]
Try to stabilize the multipleTransitions test

Change-Id: Ifeb53d6a1334623106428410aa2756935d7ba6e1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix compilation of the auto test
Lars Knoll [Fri, 27 Sep 2013 20:19:27 +0000 (22:19 +0200)]
Fix compilation of the auto test

Change-Id: I8c10463aa064a25c0170e6b7f294f48501b42319
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix a few more uses of Value
Lars Knoll [Thu, 26 Sep 2013 14:45:27 +0000 (16:45 +0200)]
Fix a few more uses of Value

Change-Id: Ib34a348d6091cc5f0a624a3f80569a08c7c78989
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove some uses of Value
Lars Knoll [Thu, 26 Sep 2013 14:38:22 +0000 (16:38 +0200)]
Remove some uses of Value

Change-Id: I63ac7485b92c96df8520f0d40b148d807e13eccb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoOptimize storeReturnValue for double arguments
Lars Knoll [Thu, 26 Sep 2013 14:17:38 +0000 (16:17 +0200)]
Optimize storeReturnValue for double arguments

Change-Id: Icfe2ad49f6e12322b4d33fefc3c6de21cc3b6141
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix API for Object::define*Property
Lars Knoll [Thu, 26 Sep 2013 11:05:25 +0000 (13:05 +0200)]
Fix API for Object::define*Property

use ValueRef instead of const Value &.

Change-Id: I3fd0ca829870db27f036825d713c53dc0600be07
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoLess QV4::Value usage
Lars Knoll [Thu, 26 Sep 2013 10:34:53 +0000 (12:34 +0200)]
Less QV4::Value usage

Fix some usages in qv4engine, and fix return types
in methods in qqmlxmlhttprequest.

Change-Id: I3d6225ca01bf7ea77fcc424914c8392bb6c3a454
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix API for evalCall()
Lars Knoll [Thu, 26 Sep 2013 10:08:03 +0000 (12:08 +0200)]
Fix API for evalCall()

Change-Id: Ib80b18348e18eb93044a73358f0c4e266b988f63
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove Value::fromString()
Lars Knoll [Thu, 26 Sep 2013 10:04:52 +0000 (12:04 +0200)]
Remove Value::fromString()

replaced with call to the GC safe ExceutionEngine::newString()
method.

Change-Id: I7258296e75ca724ff42b94a0d147bc33a05f8f68
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix Value usage in ErrorObjects
Lars Knoll [Wed, 25 Sep 2013 20:42:58 +0000 (22:42 +0200)]
Fix Value usage in ErrorObjects

Change-Id: Iaa14ad5a8d3f085843e49195f8f4bb7bb020b9b6
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove more direct QV4::Value usage
Lars Knoll [Wed, 25 Sep 2013 13:24:50 +0000 (15:24 +0200)]
Remove more direct QV4::Value usage

Remove Value::fromString(String *), and make
Encode safe against encoding raw Managed * pointers.

Change-Id: Ibca4668e1cbeaf85c78169d14386281659d33ef6
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoMake Encode not inherit from Value
Lars Knoll [Wed, 25 Sep 2013 12:03:52 +0000 (14:03 +0200)]
Make Encode not inherit from Value

This allows Encoding of Returned<> pointers, and directly
assigning them to a Value.

Change-Id: I0f22b9921ca5712538f22029fa5449242649e01c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoMove Value::toInteger(double) and related to Primitive
Lars Knoll [Wed, 25 Sep 2013 11:52:15 +0000 (13:52 +0200)]
Move Value::toInteger(double) and related to Primitive

Also clean up a few other direct uses of Value

Change-Id: Ie27d42c1b31b9e6d16d0a60071cb5e4e1c5b9e8b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoMake API of QV4::JsonObject GC clean
Lars Knoll [Wed, 25 Sep 2013 11:34:23 +0000 (13:34 +0200)]
Make API of QV4::JsonObject GC clean

Change-Id: Ie7f2d63402c9486b30caf5866af8c747026c091d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoMove Value::fromBool, ... to a new Primitive class
Lars Knoll [Wed, 25 Sep 2013 10:24:36 +0000 (12:24 +0200)]
Move Value::fromBool, ... to a new Primitive class

This will simplify finding the remaining direct usages of
QV4::Value that need fixing.

Change-Id: I223099727436d5748027c84c53d9dfc4028e38ed
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoUse SafeValue in more places
Lars Knoll [Wed, 25 Sep 2013 09:53:03 +0000 (11:53 +0200)]
Use SafeValue in more places

Change-Id: Ic15c1419c74f22bd7639ce8746ff11b15240b718
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoClean up QV4::ExecutionContext
Lars Knoll [Wed, 25 Sep 2013 08:33:35 +0000 (10:33 +0200)]
Clean up QV4::ExecutionContext

Remove an unused variable, and don't copy runtimeStrings

Change-Id: I2197a7eb82ab3dbefea83cc917567390266f9673
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix CallContext to not hold arguments on the C stack anymore
Lars Knoll [Wed, 25 Sep 2013 08:09:26 +0000 (10:09 +0200)]
Fix CallContext to not hold arguments on the C stack anymore

Change-Id: I35f46cce4f243d4b8b2bac9244f8fc26836f413b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoDoc: Updated imports, \qmlmodule, and \inqmlmodule versions in src/qml.
Jerome Pasion [Tue, 24 Sep 2013 14:58:35 +0000 (16:58 +0200)]
Doc: Updated imports, \qmlmodule, and \inqmlmodule versions in src/qml.

-QDoc ignores the version in \inqmlmodule so its better to remove them
to avoid confusion.
-Qt QML import version is 2.2 for 5.2 release
-Qt Quick import version is 2.2 for 5.2 release

Task-number: QTBUG-32172
Change-Id: I15df270f1fb4df0476a9ddd854fb9ddf58e9fc7c
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
11 years agoUpdate after changes to QTestResult API in qtbase
Tor Arne Vestbø [Thu, 26 Sep 2013 11:59:46 +0000 (13:59 +0200)]
Update after changes to QTestResult API in qtbase

Change-Id: I8a28418753a21c700a365dd369d7befa8ab14f76
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
11 years agoAllow animators to work properly with multiple windows
Gunnar Sletta [Tue, 24 Sep 2013 10:51:36 +0000 (12:51 +0200)]
Allow animators to work properly with multiple windows

Change-Id: I5ba663ba0fa089ea786cf43cb4dfa40cbc955342
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
11 years agoQSGRenderLoop: don't dereference gl pointer if it has been deleted
Dmitry Shachnev [Wed, 11 Sep 2013 07:58:14 +0000 (11:58 +0400)]
QSGRenderLoop: don't dereference gl pointer if it has been deleted

Change-Id: Icd612b243cdfe1248d1b94964c53f5102f9558d2
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
11 years agoSupport looping for "uncontrolled animations".
Gunnar Sletta [Fri, 20 Sep 2013 13:26:03 +0000 (15:26 +0200)]
Support looping for "uncontrolled animations".

The render thread animations rely heavily on uncontrolled
animations, meaning animations with duration=-1. We support
this by adding a m_currentLoopStartTime and incrementally
counting the finish time of each uncontrolled animation.

Change-Id: I1f2ccea09aff4c51b1a7f98a2ddb58636af50557
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
11 years agoSkip two tests that don't work reliably with a conservative GC
Lars Knoll [Wed, 25 Sep 2013 19:40:54 +0000 (21:40 +0200)]
Skip two tests that don't work reliably with a conservative GC

Change-Id: I5619d533b6e48c88fda063bc7cdcc62d6838bcdf
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoConvert more methods in QV8Engine
Lars Knoll [Tue, 24 Sep 2013 13:46:11 +0000 (15:46 +0200)]
Convert more methods in QV8Engine

Change-Id: I5b059b41842b4a6d9541525b3955d2b64c0011c3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoMove more API over to use ValueRef
Lars Knoll [Tue, 24 Sep 2013 13:25:10 +0000 (15:25 +0200)]
Move more API over to use ValueRef

Change-Id: I372f1f3e3e78d45912a913f437e622e0acfc9646
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoMake parts of qv8engine_p.h GC safe
Lars Knoll [Tue, 24 Sep 2013 12:28:02 +0000 (14:28 +0200)]
Make parts of qv8engine_p.h GC safe

Change-Id: Iaa15423cedc307a09b3cd7287272d93d7a604caf
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix QQmlV4Function API to be GC safe
Lars Knoll [Tue, 24 Sep 2013 11:53:54 +0000 (13:53 +0200)]
Fix QQmlV4Function API to be GC safe

Change-Id: Id4f79c22fc48ada1c8a9a858e1b7b3d1cf14d120
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix API of QQmlV4Handle
Lars Knoll [Tue, 24 Sep 2013 10:13:42 +0000 (12:13 +0200)]
Fix API of QQmlV4Handle

Change-Id: Iac4a3fefebd33a5990408598486231a5add8e639
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix Persistent/WeakValue API
Lars Knoll [Mon, 23 Sep 2013 13:52:10 +0000 (15:52 +0200)]
Fix Persistent/WeakValue API

Don't use unprotected Values in the API anymore.

Change-Id: I8851628227fca374de24701bc8ee0908b5ae3923
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoCleanups in qv4stringobject
Lars Knoll [Sun, 22 Sep 2013 19:06:34 +0000 (21:06 +0200)]
Cleanups in qv4stringobject

Make the methods GC clean, and simplify some logic

Change-Id: I02df8cb571f27d640c6effc871ea7c24b23b8368
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix WinCE build.
Sérgio Martins [Wed, 25 Sep 2013 16:11:34 +0000 (17:11 +0100)]
Fix WinCE build.

Change-Id: Ie0536ad94f88efe1e54226ed7f1d9e1042ffcc19
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoqmlimportscanner: Print usage when no arguments are passed.
Friedemann Kleint [Wed, 25 Sep 2013 13:55:12 +0000 (15:55 +0200)]
qmlimportscanner: Print usage when no arguments are passed.

Change-Id: I2ba5e18fff635705b1f5e8e19c104ba078c8e3a1
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoImport QtQml instead of QtQuick now that Locale is available there.
Mitch Curtis [Fri, 20 Sep 2013 10:31:30 +0000 (12:31 +0200)]
Import QtQml instead of QtQuick now that Locale is available there.

97feace2aaaf08075c17ea175a5ed0c12aa40a0d made it available.

Change-Id: I4a263a26c1db164f410c49fe0fca776aed53f7e8
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
11 years agoDoc: Fix documentation of qmlProtectModule
Topi Reinio [Wed, 25 Sep 2013 13:09:00 +0000 (15:09 +0200)]
Doc: Fix documentation of qmlProtectModule

Fix the function signature used in \fn command and
document the parameters.

Change-Id: Ieda9b2b402886b81691195dbad17663fd454f282
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
11 years agoAvoid out-of-bounds read.
Gunnar Sletta [Tue, 24 Sep 2013 10:48:14 +0000 (12:48 +0200)]
Avoid out-of-bounds read.

Change-Id: I28777806b13da1b0a9e1fecc2734de0614f2443c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
11 years agoInitialize variable
Gunnar Sletta [Tue, 24 Sep 2013 10:13:45 +0000 (12:13 +0200)]
Initialize variable

Change-Id: I1f3cf8b922849fc482b3c1346eb476019f466a13
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoSplit off crashing test from qqmlecmascript.
Erik Verbruggen [Wed, 25 Sep 2013 12:09:57 +0000 (14:09 +0200)]
Split off crashing test from qqmlecmascript.

Task-number: QTBUG-33658

Change-Id: I5a9f24d49ab894e3cde745cc0c1d44ef0880510f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoConvenience class for FBO rendering in Qt Quick
Gunnar Sletta [Mon, 23 Sep 2013 07:53:58 +0000 (09:53 +0200)]
Convenience class for FBO rendering in Qt Quick

Change-Id: I5712bbfa0cde9f2fe5fddc35c4cc23597717065c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoDoc: Fixed and updated Qt Quick's \qmlmodule page
Jerome Pasion [Tue, 24 Sep 2013 14:41:12 +0000 (16:41 +0200)]
Doc: Fixed and updated Qt Quick's \qmlmodule page

-incremented version to Qt Quick 2.2 (in \qmlmodule page)
-import changed to QtQuick 2.2
-\inqmlmodule no longer needs the version. QDoc will ignore the version
but it is better to remove it now to avoid confusion

Task-number: QTBUG-32172
Change-Id: I40b52e59667014720be40a35b3a8fb9836825e31
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
11 years agoDoc: Made \since commands in src/qml consistent.
Jerome Pasion [Tue, 24 Sep 2013 14:02:26 +0000 (16:02 +0200)]
Doc: Made \since commands in src/qml consistent.

-QDoc displays the Qt version in the HTML output.
-If there is only one argument to \since, QDoc assumes it is the Qt
 version.

"QtQuick 2.1" -> "Qt 5.1"
"QtQml 2.1" -> "Qt 5.1"
"QtQuick 1.1" -> "Qt 4.8"

Task-number: QTBUG-32172
Change-Id: I3c0da4dce8e44d717a6840bea250b4f0f9d78128
Reviewed-by: Martin Smith <martin.smith@digia.com>
11 years agoDoc: Made Qt Quick items' \since consistent.
Jerome Pasion [Tue, 24 Sep 2013 13:23:45 +0000 (15:23 +0200)]
Doc: Made Qt Quick items' \since consistent.

Qt 5.2:
-"\since QtQuick 2.2" -> "\since 5.2"

Qt 5.1:
-"\since QtQuick 2.1" -> "\since 5.1"
-"\since Qt 5.1" -> "\since 5.1"

Qt 5.0:
-"\since QtQuick 2.0" -> "\since 5.0"

Task-number: QTBUG-32172
Change-Id: I699b00b31373a434ddb8f4caccfef40c588bf8a4
Reviewed-by: Martin Smith <martin.smith@digia.com>
11 years agoDoc: Made \since command in Dialog QML types consistent.
Jerome Pasion [Tue, 24 Sep 2013 12:44:50 +0000 (14:44 +0200)]
Doc: Made \since command in Dialog QML types consistent.

-QDoc only requires the version number for Qt versions

Task-number: QTBUG-32172
Change-Id: Ifa3a94fa66194807d58b079b4f451af90cc1d00a
Reviewed-by: Martin Smith <martin.smith@digia.com>
11 years agowince: Build fix, NtCurrentTeb() is not available in this platform.
Sérgio Martins [Thu, 29 Aug 2013 14:21:40 +0000 (15:21 +0100)]
wince: Build fix, NtCurrentTeb() is not available in this platform.

This was copied from qtscript's:
src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp

Change-Id: Iaa5549e6915aa4aa4bf532fbe7c9117a0858ff02
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix Component.onCompleted emission and bindings for composite types
Simon Hausmann [Mon, 23 Sep 2013 14:35:34 +0000 (16:35 +0200)]
Fix Component.onCompleted emission and bindings for composite types

When instantiating the composite type with a sub QQmlObjectCreator,
make sure to link the componentAttached objects back into the parent
creator. Similarly we need to collect the bindings the sub-creator
created, as finalize() is only called on the top-level creator.

Fixes remaining failures in tst_qqmllanguage::onCompleted

Change-Id: If79b31ee94000aeec280284200df8ee97e57fd03
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix lookup scopes into the context object
Simon Hausmann [Mon, 23 Sep 2013 14:25:13 +0000 (16:25 +0200)]
Fix lookup scopes into the context object

Given

QtObject {
     property int value: 42
     property var o: QtObject {
         Component.onCompleted: print(value)
     }
}

Should print 42 - the lookup for "value" should fail in the
scope object (o) and succeed in the context object.

Fixes part of tst_qqmllanguage::onCompleted

Change-Id: If48d6a780aa0f3cb4a7757694f93359e57757973
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix component boundary detection
Simon Hausmann [Mon, 23 Sep 2013 13:58:30 +0000 (15:58 +0200)]
Fix component boundary detection

For a component boundary, the type in question has to be an actual
QQmlComponent. If it's a type that itself is derived from a component (type ==
0 && component != 0 in typereference), then it is not a boundary.

Fixes tst_qqmllanguage::componentCompositeType

Change-Id: I938abe94c2fa4c69788176235ac74d0c6e385c0c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix bug in assigning to self-declared properties in child object literals
Simon Hausmann [Mon, 23 Sep 2013 13:30:55 +0000 (15:30 +0200)]
Fix bug in assigning to self-declared properties in child object literals

When createInstance() calls populateInstance, make sure that the QObject
used for bindings is the instance we just created, not the _qobject from
the caller side (which is completely wrong and unrelated).

Change-Id: I7dc44ffaa70799b2f37258aeacdb33d8a1cf8c48
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix assigning composite type object literals to object properties
Simon Hausmann [Mon, 23 Sep 2013 13:28:13 +0000 (15:28 +0200)]
Fix assigning composite type object literals to object properties

When doing the assignability test, pick the property cache from our
property caches for the created sub object and only otherwise fall
back to the regular engine cache.

Change-Id: I07b9746335a9a169e1055a3f4dc7fd3f0ab0fdef
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix bindings on properties in grouped value type properties
Simon Hausmann [Mon, 23 Sep 2013 09:26:16 +0000 (11:26 +0200)]
Fix bindings on properties in grouped value type properties

... such as
    point.x: { someExpression }

This requires special handling to install the QQmlBinding not on the
value type itself (not possible) but on the point property itself.

Fixes tst_qqmllanguage::valueTypes

Change-Id: I8f95379e1872dff7cdcc0480c229a5e68f3cf575
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix setting the id property when also present in the type itself
Simon Hausmann [Mon, 23 Sep 2013 06:19:40 +0000 (08:19 +0200)]
Fix setting the id property when also present in the type itself

Fixes tst_qqmllanguage::idProperty

Change-Id: I3051da6a55f29bfca58aa83647fe5d51fb2a67e0
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix warnings about includes.
Friedemann Kleint [Tue, 24 Sep 2013 14:37:57 +0000 (16:37 +0200)]
Fix warnings about includes.

QtQml: WARNING: qtdeclarative/src/qml/qml/qqmlabstracturlinterceptor.h
QtQml: WARNING: qtdeclarative/src/qml/qml/qqmlfileselector.h
includes qtqmlglobal.h when it should include QtQml/qtqmlglobal.h

Change-Id: I1cc4e3a201e0f3bec34c5e4bca8ec1578c8b0224
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
11 years agoqml: handle all possible QtMsgType in switch because of -Werror
Shawn Rutledge [Mon, 23 Sep 2013 08:42:16 +0000 (10:42 +0200)]
qml: handle all possible QtMsgType in switch because of -Werror

Perhaps this illustrates why having -Werror is more of an annoyance
than whatever it was supposed to help:
https://codereview.qt-project.org/#change,65253 cannot be merged
until the new enum value that it adds is handled _everywhere_ that
it can be.

Change-Id: I2bba730b471683487e38693c9ace2d09be4c874d
Reviewed-by: hjk <hjk121@nokiamail.com>
11 years agoV4 SSA: cleanup: rename single letter variables.
Erik Verbruggen [Sat, 21 Sep 2013 16:56:52 +0000 (18:56 +0200)]
V4 SSA: cleanup: rename single letter variables.

Because "targetTemp" and "sourceTemp" is clearer than, say, t1 and t2.

Change-Id: I5195c75f1958a3bea3c370924685ff6ba9c9c515
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoV4 SSA: change life-time interval coverage calculation.
Erik Verbruggen [Fri, 20 Sep 2013 16:28:21 +0000 (18:28 +0200)]
V4 SSA: change life-time interval coverage calculation.

When iterating over the ranges in a life-time interval, stop when the
range starts after the position to check.

Change-Id: Ib64cbfc644820fdb4c0167b8db0b40dacfb5d076
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoV4: enable register allocator on linux and macos on x86_64.
Erik Verbruggen [Fri, 20 Sep 2013 14:04:29 +0000 (16:04 +0200)]
V4: enable register allocator on linux and macos on x86_64.

Change-Id: I958cf90da5c44b0119c5666df6ed2e4820444841
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoV4 regalloc: fix intersection calculation.
Erik Verbruggen [Fri, 20 Sep 2013 14:02:27 +0000 (16:02 +0200)]
V4 regalloc: fix intersection calculation.

The previous version was plain wrong: when the first interval had more
than one range, those ranges would never be checked for intersection.

This version iterates over all ranges in the first interval, and returns
the index of the first range in the second interval that overlaps with
that range. Iterating over the second interval is cut off when an
interval is found that starts after the current one end (the ranges of
both intervals are sorted).

Change-Id: I87c254a645164eb6639925c2e3b7fd7c1b1bfa0a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoV4: fix move mapping
Erik Verbruggen [Fri, 13 Sep 2013 16:43:46 +0000 (18:43 +0200)]
V4: fix move mapping

When resolving conflicting register use between basic blocks, only
insert the resolving moves into the successor when it has one incoming
edge. Because of the absence of critical edges, this implies that it is
also save to insert those moves into the predecessor block if there is
more than one incoming edge (the predecessor will only have one outgoing
edge).

Change-Id: I83c41b4ca86946d3aa09619f20ddab3e692136f2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoV4 JIT: fixes after NaN boxing changes.
Erik Verbruggen [Fri, 20 Sep 2013 13:48:47 +0000 (15:48 +0200)]
V4 JIT: fixes after NaN boxing changes.

Change-Id: I22a1b46f488dc65513ed287dabe7d85469cc5173
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoV4: re-enable SSA transformation and optimization.
Erik Verbruggen [Fri, 13 Sep 2013 10:06:45 +0000 (12:06 +0200)]
V4: re-enable SSA transformation and optimization.

But keep the register allocator disabled for now.

Change-Id: I475835ec35ef31d76e084788a754c00b1f8fdda6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoV4 JIT: generate code for unary not operator.
Erik Verbruggen [Fri, 13 Sep 2013 12:42:42 +0000 (14:42 +0200)]
V4 JIT: generate code for unary not operator.

Change-Id: I00a47d261a76db0b938f8c9300be9afc06b42d02
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoAdd qmlimportscanner.
Morten Johan Sørvig [Fri, 23 Aug 2013 13:03:20 +0000 (15:03 +0200)]
Add qmlimportscanner.

qmlimportscanner scans for import statements in qml
files and returns a JSON-formatted list of imports.
This is done recursively in order to get all dependencies.

Usage: "qmlimportscanner path/to/app/qml/"
-importPath path/to/qtbase/qml

Change-Id: I0e99caaf4216058c52a4706f7fdbeaf1eba0bbc1
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoMerge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Sergio Ahumada [Sun, 22 Sep 2013 20:36:27 +0000 (22:36 +0200)]
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev

11 years agoMake qv4objectproto GC clean
Lars Knoll [Sun, 22 Sep 2013 13:32:25 +0000 (15:32 +0200)]
Make qv4objectproto GC clean

Fix the remaining usages of raw pointers into the GC heap.

Change-Id: I3654a6f74fe6b59e25ed65a79ff02c29cc2cdecc
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix grouped property access for non-value type properties
Simon Hausmann [Sun, 22 Sep 2013 09:32:26 +0000 (11:32 +0200)]
Fix grouped property access for non-value type properties

If we don't have a value type, read the grouped property as QObject
instance and populate that instead.

Fixes tst_qqmllanguage::deepProperty

Change-Id: I9a8d5f929a9c0ebb39461863f6a93b3f35274f97
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix cases where mark() would access uninitialized memory
Lars Knoll [Fri, 20 Sep 2013 13:13:14 +0000 (15:13 +0200)]
Fix cases where mark() would access uninitialized memory

Change-Id: I4e07e20d30ba57759a0ece1c298a02b098718b33
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoPrevent objects from being collected while in their constructor
Lars Knoll [Thu, 19 Sep 2013 14:05:25 +0000 (16:05 +0200)]
Prevent objects from being collected while in their constructor

While objects are being constructed, we don't have a reference to them
on the JS stack yet. So the constructor needs to protect itself against
being collected by putting the this object onto the JS stack.

Added an environment switch MM_EXACT_GC to test exact garbage
collection.

Change-Id: Ie37665a954de800359c272ffbebbe1488e7a8ace
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoConvert the last methods in qv4object_p.h
Lars Knoll [Thu, 19 Sep 2013 11:17:55 +0000 (13:17 +0200)]
Convert the last methods in qv4object_p.h

Change-Id: I4fda83a0832760c277e629d4e658da718c0bf92b
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix some more methods to take ValueRef's
Lars Knoll [Thu, 19 Sep 2013 10:55:36 +0000 (12:55 +0200)]
Fix some more methods to take ValueRef's

Change-Id: Ia0e30ba98c16e51c9992027c7e5f78d4def8697a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
11 years agoFix some smaller spec incompliances in Array.concat
Lars Knoll [Thu, 19 Sep 2013 10:43:12 +0000 (12:43 +0200)]
Fix some smaller spec incompliances in Array.concat

Change-Id: I4a2252ef590c0d48ba734f96c7478637e1ddfd07
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
11 years agoMake sure ScopedArrayObject works as intended
Lars Knoll [Thu, 19 Sep 2013 10:42:31 +0000 (12:42 +0200)]
Make sure ScopedArrayObject works as intended

We need a proper cast method for the class.

Change-Id: I8f2e4b3201d70e8fc90148f1780fd377057947bb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
11 years agoChange the runtime API over to using StringRef's instead of String*
Lars Knoll [Thu, 19 Sep 2013 10:05:18 +0000 (12:05 +0200)]
Change the runtime API over to using StringRef's instead of String*

Change-Id: I0ea95e6cca995dc5f98871f0369204af18e48111
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoremove debug output
Lars Knoll [Thu, 19 Sep 2013 10:02:29 +0000 (12:02 +0200)]
remove debug output

Change-Id: I168f24ac12715fc65abe230b2bd0f86f777eea00
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoConvert Object::inplaceBinOp to be GC safe
Lars Knoll [Thu, 19 Sep 2013 08:33:59 +0000 (10:33 +0200)]
Convert Object::inplaceBinOp to be GC safe

Change-Id: I98a8591f4b556cc1d00271e6b389dc0d2c16e6ec
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoConvert the remaining vtable methods to be GC safe
Lars Knoll [Thu, 19 Sep 2013 07:58:50 +0000 (09:58 +0200)]
Convert the remaining vtable methods to be GC safe

Change-Id: I679d1833609c41d71e8436ec0ba8a4624f0c4dd0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoConvert putIndexed()
Lars Knoll [Thu, 19 Sep 2013 07:10:42 +0000 (09:10 +0200)]
Convert putIndexed()

Change-Id: I7d02b0fdf45079d0f7afcfb6d3158dd60cb09f33
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoconvert Managed::put() API to be GC safe
Lars Knoll [Wed, 18 Sep 2013 14:36:02 +0000 (16:36 +0200)]
convert Managed::put() API to be GC safe

Change-Id: I09198ce372fa545372db389fac26828d21ad5731
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoUse a StringRef for Managed::get()
Lars Knoll [Wed, 18 Sep 2013 13:34:13 +0000 (15:34 +0200)]
Use a StringRef for Managed::get()

also store "toString" and "valueOf" as identifiers
in the engine and fix two places where we compared
strings the wrong way.

Change-Id: I70612221e72d43ed0e3c496e4209681bf254cded
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoUse StringRef for most methods in Object
Lars Knoll [Wed, 18 Sep 2013 12:30:53 +0000 (14:30 +0200)]
Use StringRef for most methods in Object

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