platform/upstream/qtdeclarative.git
11 years agoMerge remote-tracking branch 'origin/stable' into dev
Frederik Gladhorn [Mon, 19 Aug 2013 07:47:35 +0000 (09:47 +0200)]
Merge remote-tracking branch 'origin/stable' into dev

Conflicts:
tests/auto/quick/qquickgridview/qquickgridview.pro
tests/auto/quick/qquickitem/qquickitem.pro

Change-Id: Ic54cafbdda1ac22757d2ee65dcc63a1b167c7556

11 years agoDragging MouseArea nested in Flickable does not work with touch to mouse
Martin Jones [Mon, 12 Aug 2013 03:28:17 +0000 (13:28 +1000)]
Dragging MouseArea nested in Flickable does not work with touch to mouse

A MouseArea with a drag target nested in a Flickable does not work.
This is due to QQuickWindow calling childMouseEventFilter() twice -
once in sendFilteredTouchEvent() and later in sendEvent().

Since childMouseEventFilter() has already been called, deliver the
mouse event directly in sendFilteredTouchEvent().

Task-number: QTBUG-32920
Change-Id: I22acee3c66ee6c06e71c9c876fb02dbcb6119a8d
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
11 years agoOptimize setting new properties on objects
Lars Knoll [Fri, 16 Aug 2013 08:11:20 +0000 (10:11 +0200)]
Optimize setting new properties on objects

When a property on an object is set for the first time,
this triggers a change in internal class for the object.
Record that change in the lookup, and do the same transition
in the future.

Change-Id: Ib0e8ac61ce3aaecb736532600740cec51996e3d6
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove unused overload of newCallContext()
Lars Knoll [Sat, 17 Aug 2013 11:14:51 +0000 (13:14 +0200)]
Remove unused overload of newCallContext()

Change-Id: I9b9de585b18bf87ea256db36b320a7defdcc4ac8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoSmall typo fixes.
Erik Verbruggen [Fri, 9 Aug 2013 13:37:39 +0000 (15:37 +0200)]
Small typo fixes.

Change-Id: I4aca4e02e06700738337d92ebfc18995184a31f6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFactor out protoHasArray and hasAccessorProperty
Peter Varga [Thu, 15 Aug 2013 13:54:15 +0000 (15:54 +0200)]
Factor out protoHasArray and hasAccessorProperty

The Object::protoHasArray() function returns true if any object in the
prototype chain contains an array element. The new member
hasAccessorProperty of the Managed class is set true if the object
has any accessor property.

Change-Id: Ic29d303eb058d4faed2a47ed8fab18e376ccba68
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoSimplify __qmljs_call_property_lookup
Lars Knoll [Fri, 16 Aug 2013 20:08:31 +0000 (22:08 +0200)]
Simplify __qmljs_call_property_lookup

This was still using the older (and slower) member of Lookup. Instead
call the function pointer to resolve the lookup.

Change-Id: I840b063ce4cc71f71be9be23ea7ce164887c2a91
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoNever convert the this object when calling a builtin function
Lars Knoll [Fri, 16 Aug 2013 18:40:03 +0000 (20:40 +0200)]
Never convert the this object when calling a builtin function

When calling builtin methods, the this object should should be
passed unmodified to the method. This failed so far because some
of our buitin methods where implemented slightly wrong.

Change-Id: I725f4dc952b4af6101645cf702e01b5410406a92
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoMove arguments object creation into the generated code
Lars Knoll [Fri, 16 Aug 2013 10:54:30 +0000 (12:54 +0200)]
Move arguments object creation into the generated code

So far we've been creating the arguments object at runtime
in initCallContext(). It's much more efficient to simply add
arguments as a local variable in qv4codegen if it's being used
and initialize it through a builtin method.

Change-Id: I6913f3565adf3aa1917adae8dceef9f50ecf1722
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoOptimize contruction of Arguments objects
Lars Knoll [Fri, 16 Aug 2013 06:53:47 +0000 (08:53 +0200)]
Optimize contruction of Arguments objects

Change-Id: If77bff28a25462a6069d646a2594dd903fefb9e5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix two small issues when construcint Array objects
Lars Knoll [Fri, 16 Aug 2013 06:52:34 +0000 (08:52 +0200)]
Fix two small issues when construcint Array objects

When constructing from a stringlist, we need to correctly
set arrayDataLen.
init() doesn't need to malloc a memberData array, as we have
4 properties stored inline.

Change-Id: Ia35bd89fe2d58b80ebba1356ba1d16f088d111e4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoOptimize Function.prototype.apply/call()
Lars Knoll [Thu, 15 Aug 2013 14:32:05 +0000 (16:32 +0200)]
Optimize Function.prototype.apply/call()

Use a QVarLengthArray instead of a QVector for holding
the arguments that are being passed on.

Change-Id: I41500fecb1efc94ae1735adb3c631596916ed7d2
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoDoc fix
Alan Alpert [Wed, 14 Aug 2013 22:06:50 +0000 (15:06 -0700)]
Doc fix

Grammar and word choice

Change-Id: If736f1d7a6f6396101924c9357c5235605b80b43
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
11 years agoFix tst_qquickfolderlistmodel flakiness using QSignalSpy::wait.
David Faure [Fri, 16 Aug 2013 11:05:38 +0000 (13:05 +0200)]
Fix tst_qquickfolderlistmodel flakiness using QSignalSpy::wait.

The signal is emitted in a thread, so creating the spy afterwards
is racy (due to isSignalConnected() at the beginning of QMetaObject::activate).
Creating the spy before hand fixes the race, and using QSignalSpy::wait()
leads to much smaller code, in addition.
Note that the call to wait() itself isn't racy, even if it happens "after" the
signal emission: the signal goes via the event loop so it will always be received
by the main thread within the call to wait(), never before.

In addition setPath() is called once upon creation, and again via the
setProperty call. If we don't wait for the initial listing to happen,
we're replacing it, and then folderChanged is never emitted.

Change-Id: Iab7eada2e9db8ba710f05bc3b82941c782f36467
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix currentIndex in Qml itemView when assigning an empty model
Nils Jeisecke [Tue, 6 Aug 2013 11:58:15 +0000 (13:58 +0200)]
Fix currentIndex in Qml itemView when assigning an empty model

When assigning an empty model to e.g. a ListView after component
initialization has been completed, currentIndex is now correctly
set to -1.

Change-Id: I540c034944009ccb8894bf84f400658ef9f0371f
Task-number: QTBUG-32838
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
11 years agoMarking tst_qquickgridview as insignificant in win and macx
Simo Fält [Fri, 16 Aug 2013 08:58:05 +0000 (11:58 +0300)]
Marking tst_qquickgridview as insignificant in win and macx

This test is flaky.

Task-number: QTBUG-33017
Change-Id: I589706937a6de44291694029afb11c05a285c1cd
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
11 years agoMarking tst_qquicktextedit as insignificant in win
Simo Fält [Fri, 16 Aug 2013 09:44:37 +0000 (12:44 +0300)]
Marking tst_qquicktextedit as insignificant in win

This test haven't passed in WIN after the stage was made blocking.

Change-Id: I246f96e98080845c5364aba720158dbd42a5f454
Task-number: QTBUG-32540
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
11 years agoMake compare check against the right color
Gunnar Sletta [Tue, 13 Aug 2013 13:27:32 +0000 (15:27 +0200)]
Make compare check against the right color

Change-Id: Ie23864c782ecdda26b68eb8813799aecae7bbb7e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
11 years agoDon't repaint the Canvas if it's just changing position.
Mitch Curtis [Thu, 15 Aug 2013 13:04:01 +0000 (15:04 +0200)]
Don't repaint the Canvas if it's just changing position.

Task-number: QTBUG-33005

Change-Id: I94613c0a0e066798800e068aee7c6288fce54dbd
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
11 years agoMerge remote-tracking branch 'origin/release' into stable
Sergio Ahumada [Thu, 15 Aug 2013 18:56:56 +0000 (20:56 +0200)]
Merge remote-tracking branch 'origin/release' into stable

Change-Id: I3953f2473e3b2cf9768286fef1c5efd08c61c6f0

11 years agoAdd changes-5.1.1 file
Alan Alpert [Tue, 13 Aug 2013 23:07:25 +0000 (16:07 -0700)]
Add changes-5.1.1 file

Task-number: QTBUG-32808
Change-Id: I44852be41c18491a38f80afa71eda8b85b51381d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoMarking tst_qquickitem as insignificant in win
Simo Fält [Thu, 15 Aug 2013 10:42:15 +0000 (13:42 +0300)]
Marking tst_qquickitem as insignificant in win

This test haven't passed in WIN after the stage was made blocking.

Task-number: QTBUG-32664
Change-Id: I0e84ff202d28a018e3e04dcf15f3a9ce6c66349b
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
11 years agoMarking tst_qquickmousearea as insignificant on win
Simo Fält [Thu, 15 Aug 2013 12:48:28 +0000 (15:48 +0300)]
Marking tst_qquickmousearea as insignificant on win

This test seems flaky in windows.

Task-number: QTBUG-33006
Change-Id: I1c67e1a498e4c5765580a316504e04776af5e109
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
11 years agoMake sure we propegate the filtering state to the internal texture.
Gunnar Sletta [Thu, 15 Aug 2013 11:52:16 +0000 (13:52 +0200)]
Make sure we propegate the filtering state to the internal texture.

Change-Id: Id928cf35eba254270b29a34129eb977dab34db63
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
11 years agotest: Remove v8-private for tst_pointers
Sergio Ahumada [Thu, 15 Aug 2013 14:08:10 +0000 (16:08 +0200)]
test: Remove v8-private for tst_pointers

Change-Id: I60f98d1f3563d19e141439385e9d862590d8f63f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFileDialogs example: added option to open the files
Shawn Rutledge [Wed, 14 Aug 2013 14:03:33 +0000 (16:03 +0200)]
FileDialogs example: added option to open the files

Qt.openUrlExternally is a nice feature to remind users about, and
gives this file dialog some purpose.

Change-Id: I56e436f8b2f4362891450d57b6d9c36e26983513
Reviewed-by: Liang Qi <liang.qi@digia.com>
11 years agoexamples: set application name and organization for QSettings
Shawn Rutledge [Tue, 6 Aug 2013 13:04:35 +0000 (15:04 +0200)]
examples: set application name and organization for QSettings

With the Qt.labs.settings module available, it makes sense for each
example to have its own settings file.

Change-Id: I8257f04ec13c7caf9995e03626e5453c653cfb92
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
11 years agoImprove reliability of v4 debugger tests
Simon Hausmann [Tue, 13 Aug 2013 10:00:39 +0000 (12:00 +0200)]
Improve reliability of v4 debugger tests

Sometimes the test hangs on shutdown. Don't wait for the finished signal to be
emitted with an event loop, instead do the QThread equivalent of pthread_join:
wait().

Change-Id: I3583e8366c08fc0446682d124d86df4ffa3290d3
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoUnset the cursor when an Item is unparented
Daiwei Li [Fri, 9 Aug 2013 19:04:41 +0000 (12:04 -0700)]
Unset the cursor when an Item is unparented

It's possible for a cursor to get stuck if an item
gets deleted. QQuickItemPrivate::derefWindow sets
the cursorItem in QQuickWindowPrivate to 0, but
doesn't unset the cursor. This causes the cursor
to get stuck until the user hovers their mouse over
an item that has a cursor set.

Change-Id: I1d5d3ff13d69c76e4f8fe86b1f5b669bb714ecca
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
11 years agoAdd changes-5.2.0 file
J-P Nurmi [Wed, 14 Aug 2013 08:01:48 +0000 (10:01 +0200)]
Add changes-5.2.0 file

Change-Id: I1574531ae13998f3fbf77c72cc04247a3b053c2e
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
11 years agoFix Array.prototype.concat
Peter Varga [Tue, 13 Aug 2013 08:43:15 +0000 (10:43 +0200)]
Fix Array.prototype.concat

The following tests failed in the test262 test suite due to incomplete
implementation:
- ch15/15.4/15.4.4/15.4.4.4/15.4.4.4-5-c-i-1
- ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A2_T1
- ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A2_T2
- ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A3_T1

Change-Id: I423e77fe3d34140a08c61efdc18c81ef251bc927
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoAdd utility conversion methods for use in the JIT.
Erik Verbruggen [Tue, 30 Jul 2013 14:53:03 +0000 (16:53 +0200)]
Add utility conversion methods for use in the JIT.

Change-Id: Iec3eeb849df924919662e8d2ca6593d66c70e3eb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoMake some clone methods statically accessible.
Erik Verbruggen [Tue, 30 Jul 2013 14:39:11 +0000 (16:39 +0200)]
Make some clone methods statically accessible.

Change-Id: I5943c30d239a26869fefec608cb8e4a27a31aaaa
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoMove the Param struct out of the Instr union.
Erik Verbruggen [Fri, 9 Aug 2013 13:57:28 +0000 (15:57 +0200)]
Move the Param struct out of the Instr union.

The parameter struct was accidentally put in the instruction union. As
it is not an instruction, it should not be part of that union.

Change-Id: Id70619fed50ae606f43f2c1701f28aea0a0baed7
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoAdded an iterative version of factorial as a (performance) test.
Erik Verbruggen [Thu, 1 Aug 2013 12:06:52 +0000 (14:06 +0200)]
Added an iterative version of factorial as a (performance) test.

Change-Id: I2c64b84d060792c0a1b111b854495cafcf24db33
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoSay hello to Qt.labs.settings
J-P Nurmi [Mon, 17 Jun 2013 16:26:38 +0000 (18:26 +0200)]
Say hello to Qt.labs.settings

Change-Id: Id4970555b2cbbc2df893dd6269fb8b884ce06e45
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
11 years agoMerge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging...
Sergio Ahumada [Tue, 13 Aug 2013 22:18:19 +0000 (00:18 +0200)]
Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable

11 years agotest: Mark tst_qqmlmoduleplugin::incorrectPluginCase() as XFAIL
Sergio Ahumada [Mon, 12 Aug 2013 08:30:58 +0000 (10:30 +0200)]
test: Mark tst_qqmlmoduleplugin::incorrectPluginCase() as XFAIL

Mark incorrectPluginCase() as expected failure on OS X 10.8

Task-number: QTBUG-32652
Change-Id: I8fd2c0ceacabfc74defe84fc6538b268145c5110
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
11 years agoChange post-increment/-decrement to not use a built-in.
Erik Verbruggen [Sat, 27 Jul 2013 13:12:22 +0000 (15:12 +0200)]
Change post-increment/-decrement to not use a built-in.

Change-Id: I98af408db1e5d23e73a77d2614071bc998170f5e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoDoc: Renamed accessibility example to "quick-accessibility".
Jerome Pasion [Mon, 12 Aug 2013 15:53:40 +0000 (17:53 +0200)]
Doc: Renamed accessibility example to "quick-accessibility".

-Generated HTML file name conflicted with accessibility group.

Task-number: QTBUG-32580
Change-Id: I5f5a4bb8134268c58105ea61d5ae3bbdd35c0d50
Reviewed-by: Martin Smith <martin.smith@digia.com>
11 years agoDoc: Renamed and moved examples/qml/i18n to examples/qml/qml-i18n
Jerome Pasion [Mon, 12 Aug 2013 13:24:03 +0000 (15:24 +0200)]
Doc: Renamed and moved examples/qml/i18n to examples/qml/qml-i18n

-the generated HTML page conflicts with the i18n.html page from qtdoc.
-edited the content.

Task-number: QTBUG-32580
Change-Id: I32ded1913d9faecb95e28043983e957ccd0e8749
Reviewed-by: Martin Smith <martin.smith@digia.com>
11 years agoFix memory leak in identifier table
Simon Hausmann [Mon, 12 Aug 2013 14:13:37 +0000 (16:13 +0200)]
Fix memory leak in identifier table

Change-Id: I8bc393856cad85734160b52dee745509be502247
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoRemove dependency to qtjsbackend from sync.profile
Simon Hausmann [Tue, 13 Aug 2013 07:22:45 +0000 (09:22 +0200)]
Remove dependency to qtjsbackend from sync.profile

This isn't needed anymore

Change-Id: I0baf3eeb19221dd9c85cfe0f1af34c92d2b13d63
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
11 years agoFix leaks in Phi nodes in the V4 IR
Simon Hausmann [Mon, 12 Aug 2013 11:47:34 +0000 (13:47 +0200)]
Fix leaks in Phi nodes in the V4 IR

The phi nodes store a QVector, but as the destructors of the IR nodes aren't
called, the QVector internal data is leaked. This patch re-uses the existing
Stmt::Data mechanism that was introduced to serve exactly that purpose. It
replaces the now unused QVectors there with the Phi::incoming vector and
adjusts usage accordingly.

Change-Id: I22f351a17c1983637b54fa73a93dd40d64fec46c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix leak of QString in V4 IR
Simon Hausmann [Mon, 12 Aug 2013 11:30:19 +0000 (13:30 +0200)]
Fix leak of QString in V4 IR

The destructors of the IR nodes won't be called because they come out of
a memory pool. Therefore we must store strings by pointer from the function's
string pool.

Change-Id: I841e801b81c871e8d08cf63ee1e053744c0bf4dc
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix hover event crash
Josh Faust [Thu, 1 Aug 2013 22:51:03 +0000 (16:51 -0600)]
Fix hover event crash

It was possible for a hover event to be sent to a QQuickItem that has
already been scheduled to be deleted (through deleteLater()). This
lead to an access on an already-freed object when the leave event
is generated. This change ensures that the item is part of a scene
before generating the hover enter event.

Task-number: QTBUG-32771

Change-Id: I69adb6bbd0ae52c70a6bda4e6c918b7671549a4c
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
11 years agoDon't set opacity when we are not told
Gunnar Sletta [Thu, 1 Aug 2013 14:19:00 +0000 (16:19 +0200)]
Don't set opacity when we are not told

Change-Id: I8addc16f37ad9ce431a3b7b2fd1a4884693d7e38
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
11 years agoPublic API for creating atlas textures, when available.
Gunnar Sletta [Fri, 2 Aug 2013 13:18:32 +0000 (15:18 +0200)]
Public API for creating atlas textures, when available.

Atlas textures are currently only used when scenegraph is
combined with the customcontext from the playground/scenegraph
module.

Change-Id: I42f62abdad42e97cc1dcdc05bfb16ecf2839dc0e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
11 years agoFix QSGSimpleTextureNode's dirty signals for atlas textures
Gunnar Sletta [Sat, 3 Aug 2013 18:42:44 +0000 (20:42 +0200)]
Fix QSGSimpleTextureNode's dirty signals for atlas textures

When used in an atlas, changing the texture also changes the
geometry.

Change-Id: I744eb0ef58aed9f3a5e51ea89c4da1fad5824633
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
11 years agoRe-enable JIT
Simon Hausmann [Mon, 12 Aug 2013 14:45:47 +0000 (16:45 +0200)]
Re-enable JIT

Ooops, an earlier commit accidentally disabled it.

Change-Id: I7b732e0addba8b6403e0d6818d784f267711af42
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
11 years agoFix build on QNX
Simon Hausmann [Mon, 12 Aug 2013 10:45:24 +0000 (12:45 +0200)]
Fix build on QNX

There is std::isnan and friends, but math.h also defines isnan as macro,
so std::isnan expands to std::whateverthemacrois and that fails to build.
So include math.h early on, get rid of the macros and then we can continue
to use std::isnan throughout the code base safely.

Change-Id: Ifee580fa2adff396eb6d6f064d4c095a896fb022
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
11 years agoMerge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Frederik Gladhorn [Mon, 12 Aug 2013 10:51:49 +0000 (12:51 +0200)]
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev

11 years agoExport V4::PersistentValuePrivate
Alex Blasche [Fri, 9 Aug 2013 11:28:02 +0000 (13:28 +0200)]
Export V4::PersistentValuePrivate

Indirectly required by QtLocation and its use of QJSValuePrivate

Change-Id: Iea5bca47af8195e344d17fe2b82118141656d997
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoAdd reference counting to the VM functions
Simon Hausmann [Fri, 9 Aug 2013 14:45:02 +0000 (16:45 +0200)]
Add reference counting to the VM functions

This reduces memory pressure, keep engine->functions small and thus makes back
trace lookup faster. It became visible for example in the QtQuickControls
auto-tests that use plenty of loaders and we ended up with 30k+ functions.

Change-Id: Iaa5981f44e1e49ad9417a50c1e6a74946090dd28
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoImprove reliability of tst_qqmlcomponent::onDestructionLookup auto test on Windows
Simon Hausmann [Mon, 12 Aug 2013 09:55:53 +0000 (11:55 +0200)]
Improve reliability of tst_qqmlcomponent::onDestructionLookup auto test on Windows

The test relies on exact garbage collection, which we can't offer anymore.
But we can use the same tricks as in qqmlecmascript to improve the changes
of a successful collect significantly.

Change-Id: I7b3d7eca7a9bdb551a01a5a3da80549196c45f23
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
11 years agoMerge remote-tracking branch 'origin/stable' into dev
Frederik Gladhorn [Mon, 12 Aug 2013 10:28:12 +0000 (12:28 +0200)]
Merge remote-tracking branch 'origin/stable' into dev

Change-Id: Ibb584a2d7975996cd26514b82d1da2d447fcbebf

11 years agoSupport opt-in QSGNode descriptions without breaking binary compat.
Gunnar Sletta [Fri, 2 Aug 2013 19:04:44 +0000 (21:04 +0200)]
Support opt-in QSGNode descriptions without breaking binary compat.

This define is quite useful for debugging scene graph internals, but
it is disabled by default to conserve memory.

For clarity, I renamed the define to QSG_RUNTIME_DESCRIPTION.

Change-Id: Ie5ff44d67af38adc65d0d09255d8533dc7a33bff
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
11 years agoIntroduce QSGMaterial::CustomCompileStep
Gunnar Sletta [Tue, 6 Aug 2013 12:18:19 +0000 (13:18 +0100)]
Introduce QSGMaterial::CustomCompileStep

Nobody reimplements the virtual QSGMaterialShader::compile()
function, so we disable that code path and make it opt-in for
compatibility.

We do this, because opens up for that the renderer can do something
different, including changing the source code to allow for better
optimization.

Change-Id: Ia72f9eda7d6428e26878158ab03349f753a35c66
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
11 years agoGet rid of unused outer function pointer of QV4::Function
Simon Hausmann [Fri, 9 Aug 2013 08:41:35 +0000 (10:41 +0200)]
Get rid of unused outer function pointer of QV4::Function

Change-Id: I3ea88d3c259447081d1ac5f85d7da95fed8f02f6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoDocument parenting behaviour of delegates in QML ListView and Component.
Tomasz Siekierda (sierdzio) [Sun, 4 Aug 2013 10:12:26 +0000 (12:12 +0200)]
Document parenting behaviour of delegates in QML ListView and Component.

ListView:
As delegates are instantiated in ListView, they are parented to views
contentItem. This is now explicitly stated in the documentation.

Component:
Components are not derived from Items, so they cannot hook to anchors.

Task-number: QTBUG-24822
Change-Id: I09e04fbcc01b2858c039d22f9600ef201a9a91ab
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
11 years agoMerge remote-tracking branch 'origin/release' into stable
Sergio Ahumada [Fri, 9 Aug 2013 20:37:42 +0000 (22:37 +0200)]
Merge remote-tracking branch 'origin/release' into stable

Change-Id: I3bcc89d3e503b933e4bd4df241c8169e73fb9bd5

11 years agotest: Adapt to Qt.platform.os rename ("mac" -> "osx")
Sergio Ahumada [Fri, 9 Aug 2013 11:16:28 +0000 (13:16 +0200)]
test: Adapt to Qt.platform.os rename ("mac" -> "osx")

Marking this test as QSKIP and also updating the JIRA task

Task-number: QTBUG-32650
Change-Id: I9e98024bf50c43f96269c39d779803ae9c46168d
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
11 years agoDoc: Update example used for QML getting started tutorial
Topi Reinio [Thu, 1 Aug 2013 09:39:02 +0000 (11:39 +0200)]
Doc: Update example used for QML getting started tutorial

Update the example project referred to in Getting Started with Qt
Quick tutorial.

    - Fix coding/comment style issues
    - Change plugin TARGET name, Use /imports as the
      destination directory
    - Fix qmldir with proper module info, delete unused
      qmldir from /core
    - Add a .qmlproject file

Change-Id: If269e61fb76399faae753469dc251d07cc219139
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
11 years agoFix binop related crashes in the interpreter
Simon Hausmann [Fri, 9 Aug 2013 08:06:10 +0000 (10:06 +0200)]
Fix binop related crashes in the interpreter

if (foo instanceof blah) would crash because we generated a BinOp instruction
with a null aluop pointer. Instanceof, in and add are binops that now require
a context, and thus require a different instruction (BinOpContext). This was
already handled by the traditional binop() of the isel, but not by the binop
expression that can be in a cjump. Centralize the code by calling a common
binop helper from isel binop as well as cjump.

Change-Id: I793ee3eebe56db4c86d5399a783a84be3093fd35
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix invalid condition in comparisson.
Erik Verbruggen [Fri, 9 Aug 2013 10:18:29 +0000 (12:18 +0200)]
Fix invalid condition in comparisson.

Thanks to clang (top-of-trunk) pointing out that the unary not operator
only applies to the left-hand side of the equality expression.

Change-Id: I093b447d55995a4122aeac042a506eb56f8b2442
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoDoc: Moved QML "plugins" example to "qmlextensionplugins"
Jerome Pasion [Thu, 8 Aug 2013 15:42:48 +0000 (17:42 +0200)]
Doc: Moved QML "plugins" example to "qmlextensionplugins"

The example generates a plugins.html which collides with the
plugins.html from qtbase repository.

Task-number: QTBUG-32580
Change-Id: I47ce9e00378738f7696672e6e47dd3337bb4fafc
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
11 years agoFix needless conversion from char * to QString
Kai Koehne [Wed, 7 Aug 2013 09:07:40 +0000 (11:07 +0200)]
Fix needless conversion from char * to QString

Converting the strings to UTF-16 unconditionally whenever the library is
loaded is overkill. Anyhow, the literals are only passed to methods also
accepting a QLatin1String, so we don't have to convert at all.

Change-Id: I84e813ac989344bc2e359f340696423766392c93
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
11 years agoRemove unused local variables
Kai Koehne [Wed, 7 Aug 2013 08:43:10 +0000 (10:43 +0200)]
Remove unused local variables

Change-Id: I910c47cd404c0c5c1c324e956927966e834b488e
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
11 years agoTrivial compile fix for tools/v4/v4
Simon Hausmann [Thu, 8 Aug 2013 13:30:58 +0000 (15:30 +0200)]
Trivial compile fix for tools/v4/v4

Change-Id: Idc17c13630d3684d9ae280632da1d1403700838e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix tst_qqmlecmascript::scope() and behavioural compatibility with v8 based qml
Simon Hausmann [Thu, 8 Aug 2013 12:57:36 +0000 (14:57 +0200)]
Fix tst_qqmlecmascript::scope() and behavioural compatibility with v8 based qml

In the V8 based QML the global object would come _before_ the "QML global object",
which is the QML context (wrapper). We had a bunch of tests that verify the exact
scope chain and with this "compatibility" fix we can re-enable them.

Also fix missing prototype setup for the console object.

Change-Id: Ib3886f2d86472eb752a6ad1a2d8d89709548c5b4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoExport QJSValuePrivate
Alex Blasche [Thu, 8 Aug 2013 11:41:33 +0000 (13:41 +0200)]
Export QJSValuePrivate

Declarative components of QtLocation require it.

Change-Id: Ie520d3131718c15c0908c784d9486a5674570a54
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix another bug with automatic semicolon insertion
Simon Hausmann [Thu, 8 Aug 2013 12:17:53 +0000 (14:17 +0200)]
Fix another bug with automatic semicolon insertion

Avoid empty statements after else.

Change-Id: Ia7782a3371bc79c7e93857aa252309d2824a5a9e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix hasOwnProperty on various types wrapped in QML
Simon Hausmann [Thu, 8 Aug 2013 10:52:56 +0000 (12:52 +0200)]
Fix hasOwnProperty on various types wrapped in QML

* Change semantics of Object::query to not walk the prototype chain but let the
  caller do that where needed (__hasProperty__)
* Re-implement query in various places
* Implement method_hasOwnProperty to fall back to query() if getOwnProperty failed
* Fix missing prototype initialization in some qml wrappers, as well as missing base
  class calls to ::get()

Change-Id: Ic2a702fd5ff3be2ff3c8317a8a24f99940a9594f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoClean up some header dependencies
Lars Knoll [Thu, 8 Aug 2013 11:35:17 +0000 (13:35 +0200)]
Clean up some header dependencies

The compiler should have as little dependencies onto
the runtime as possible.

Change-Id: I3e16a55a4920299945ed405926a6851ed947f42d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoThe Moth VME is actually part of the runtime, not the compiler
Lars Knoll [Thu, 8 Aug 2013 11:27:38 +0000 (13:27 +0200)]
The Moth VME is actually part of the runtime, not the compiler

Change-Id: Idcb7a6b6157c58e33192f86750ded487c0e75b9f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoMove the parser folder from src/qml/qml to src/qml
Lars Knoll [Thu, 8 Aug 2013 11:17:32 +0000 (13:17 +0200)]
Move the parser folder from src/qml/qml to src/qml

Change-Id: I5e5684f5b98b00f791ade99c4cb6bc2ed880ad6a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoMove the JS Api into it's own folder
Lars Knoll [Thu, 8 Aug 2013 11:02:40 +0000 (13:02 +0200)]
Move the JS Api into it's own folder

Change-Id: I7ef371ff929387097862121b73a7a5863b51ccf1
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove outdated notes file
Lars Knoll [Thu, 8 Aug 2013 10:59:29 +0000 (12:59 +0200)]
Remove outdated notes file

Change-Id: I612e6703616247c754935e43204718ebce7f1cd8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoAvoid redundant state changes in distancefield text shader
Gunnar Sletta [Wed, 7 Aug 2013 11:18:10 +0000 (13:18 +0200)]
Avoid redundant state changes in distancefield text shader

Change-Id: I7efdd167192017acefb4745d433b77b6d0ff85e7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
11 years agoDisable the udis86 disassembler by default
Lars Knoll [Thu, 8 Aug 2013 07:58:18 +0000 (09:58 +0200)]
Disable the udis86 disassembler by default

It's only required for debugging the JIT, and thus
shouldn't be included in a regular build. Enable it
with CONFIG+=disassembler

Change-Id: I71264da0be00e8618f120ac9d3d06e6cb4b6dfae
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove the now unused rewriter directory
Lars Knoll [Thu, 8 Aug 2013 07:31:39 +0000 (09:31 +0200)]
Remove the now unused rewriter directory

The qml rewriter is not needed anymore with the
new JS engine

Change-Id: I87fe92eff6e28f6699df6377c1aca5a5b1c92ddd
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRestructure source code
Lars Knoll [Thu, 8 Aug 2013 07:20:52 +0000 (09:20 +0200)]
Restructure source code

Move the v4 engine classes from a subdir of qml/qml into
two subdirs (compiler and jsruntime) of the qml module
Remove an unsued qv4syntaxchecker class, and move
the moth code directly into compiler.

Change-Id: I6929bede1f25098e6cb2e68087e779fac16b0c68
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove the llvm isel backend
Lars Knoll [Thu, 8 Aug 2013 06:58:48 +0000 (08:58 +0200)]
Remove the llvm isel backend

This code never worked.

Change-Id: I0fd7421ae983f3ad43e84e5d7579cdbb610ab2b2
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoOptimize the JS == operator
Lars Knoll [Tue, 6 Aug 2013 20:55:09 +0000 (22:55 +0200)]
Optimize the JS == operator

Implement the isEqualTo vtable method for
String, and use that to compare strings and
objects in the == implementation in one go.

Change-Id: I823ae5c4ed0683105e7a6fc5b414db92d1766fc4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove context argument from most binops
Lars Knoll [Mon, 5 Aug 2013 21:41:42 +0000 (23:41 +0200)]
Remove context argument from most binops

Change-Id: I4fa2636f1b2c8e8426b64d6e16bc7c223e6f327a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoSpeed up JS comparison operations
Lars Knoll [Mon, 5 Aug 2013 20:48:35 +0000 (22:48 +0200)]
Speed up JS comparison operations

Remove the not used context parameter where possible, and
simplify the NaN != NaN case.

Change-Id: I05e9639f7bac4bb1db2f33d70f063c71561ffd34
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoEnable QtDeclarative for iOS
Richard Moe Gustavsen [Wed, 7 Aug 2013 07:54:07 +0000 (09:54 +0200)]
Enable QtDeclarative for iOS

Change-Id: I44fce954fbe2abd1903991464c0e7f74e840b719
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoProspective fix for builds in the CI system on Windows machines
Simon Hausmann [Wed, 7 Aug 2013 08:20:13 +0000 (10:20 +0200)]
Prospective fix for builds in the CI system on Windows machines

Don't check out the test262 module by default, it isn't strictly necessary
at this point and is causing issues on some Windows machines.

Change-Id: I633404f1c00d83dcbdca06a1d287623190323028
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoStop the update timer when no windows are visible
Gunnar Sletta [Wed, 7 Aug 2013 08:07:34 +0000 (10:07 +0200)]
Stop the update timer when no windows are visible

Change-Id: Ib9758a99891829d9bec81996687373d08ecfa055
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
11 years agosync.profile: Point dependencies to an empty string again
Sergio Ahumada [Tue, 6 Aug 2013 18:23:59 +0000 (20:23 +0200)]
sync.profile: Point dependencies to an empty string again

Change-Id: Ia39c708722ad99b43d3aa2541eb22524ff819ebb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoMerge "Merge branch 'stable' into dev" into refs/staging/dev
Sergio Ahumada [Tue, 6 Aug 2013 14:07:23 +0000 (16:07 +0200)]
Merge "Merge branch 'stable' into dev" into refs/staging/dev

11 years agoRemove C-style casts from public headers.
Thiago Macieira [Tue, 6 Aug 2013 05:12:40 +0000 (22:12 -0700)]
Remove C-style casts from public headers.

Task-number: QTBUG-32735

Change-Id: I14c313d17b80dce1826290ddd634f449b315190e
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
11 years agoMerge branch 'wip/v4' of ssh://codereview.qt-project.org/qt/qtdeclarative into dev
Simon Hausmann [Tue, 6 Aug 2013 13:57:54 +0000 (15:57 +0200)]
Merge branch 'wip/v4' of ssh://codereview.qt-project.org/qt/qtdeclarative into dev

Change-Id: I278524d0f43d2237201d9cf78c1c36a5ecc83d84

11 years agoDoc: createObject: adapted description of example
Nico Vertriest [Thu, 4 Jul 2013 12:13:44 +0000 (14:13 +0200)]
Doc: createObject: adapted description of example

Plus language/style edits

Restored brief statement QQmlComponent.cpp

Task-number: QTBUG-32222

Change-Id: I07da54bad3e13f163475ed2a0760e66d50795f6f
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
11 years agoFix some GC related tests to work with MSVC
Simon Hausmann [Tue, 6 Aug 2013 09:57:42 +0000 (11:57 +0200)]
Fix some GC related tests to work with MSVC

Using alloca instead of memset we can convince even MSVC to allocate memory on the
stack, to overwrite any previous dead V4 pointers.

Change-Id: Ic01bebfc6368e9c3ce1f6155a0f0ea206b90764c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoImprove memory usage of QQuickTextNode.
Michael Brasser [Thu, 1 Aug 2013 17:38:36 +0000 (12:38 -0500)]
Improve memory usage of QQuickTextNode.

The typical number of BinaryTreeNodes needed for a text line should be
much lower than 256.

Task-number: QTBUG-32770
Change-Id: I85aa161eb7cb6e55657213304b7577a0a33f1b67
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
11 years agoSkip the date time conversion tests on Windows
Simon Hausmann [Mon, 5 Aug 2013 14:17:09 +0000 (16:17 +0200)]
Skip the date time conversion tests on Windows

There's an issue in QDateTime, now that we're using that in our ECMAScript
date implementation...

Change-Id: I7599900a670097623d1b7e5b9bb086ef43d6e7e6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoDisable some GC sensitive tests with MSVC
Simon Hausmann [Mon, 5 Aug 2013 14:06:20 +0000 (16:06 +0200)]
Disable some GC sensitive tests with MSVC

We can't get these tests to work reliably with MSVC because it depends on
how MSVC optimizes away memory stores that are "dead" stores for the compiler
but not for our conservative collector.

Change-Id: Ia5ca197573a09358c220d926deccaaf0bacc3a0b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix integer preserving arithmetics with the interpreter
Simon Hausmann [Mon, 5 Aug 2013 13:55:45 +0000 (15:55 +0200)]
Fix integer preserving arithmetics with the interpreter

This fixes qqmllanguage and some other auto-tests with the interpreter

When adding numbers, make sure to preserve them as integer if left and
right hand side are integers. We do this now consistently throughout
the runtime by providing fallback implementations of mul/sub/add_int32.

Change-Id: I37e24ce14dc676bb072571b57289965ec59999c1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix line number resolution with the interpreter and try {} catch {}
Simon Hausmann [Mon, 5 Aug 2013 13:20:08 +0000 (15:20 +0200)]
Fix line number resolution with the interpreter and try {} catch {}

When re-entering the interpreter for a try block, we use a different code
pointer and therefore need to set context->interpreterInstructionPointer
accordingly. We do that now at the beginning of run(), before we start
interpreting the instructions. When returning from a try block, we continue
using the old "code" pointer and therefore need to set
context->interpreterInstructionPointer back.

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