platform/upstream/qtdeclarative.git
9 years agoBetter align data members in ExecutionContext
Lars Knoll [Mon, 19 Jan 2015 15:36:17 +0000 (16:36 +0100)]
Better align data members in ExecutionContext

Saves another 4-8 bytes per object.

Change-Id: Iaeb013abd20733cd7a5d9a5e0d42b92da8153da9
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoRemove the realArgumentsCount member in CallContext
Lars Knoll [Mon, 19 Jan 2015 15:29:48 +0000 (16:29 +0100)]
Remove the realArgumentsCount member in CallContext

The data is easily available through the CallData, only used by
the Arguments object and we save a pointer in Heap::CallData this way.

For this to work, let CallData::argc always return the real number
of arguments passed into the function.

Change-Id: I59c7c41e8c1af160db09fa794977ab7084c9e12d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoStore a double in NumberObject
Lars Knoll [Fri, 16 Jan 2015 11:44:51 +0000 (12:44 +0100)]
Store a double in NumberObject

Makes more sense than storing a Value in there.

Change-Id: I2e6ca71477100c1e1639bb89cced4f4049b5e5c2
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoCleanups
Lars Knoll [Thu, 15 Jan 2015 20:54:12 +0000 (21:54 +0100)]
Cleanups

Simplify some code in BooleanObject
Simplify access to call arguments and thisObject

Change-Id: I2f8e844019bc587385608beb02f05b15f827535c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoCleanups
Lars Knoll [Thu, 15 Jan 2015 20:28:01 +0000 (21:28 +0100)]
Cleanups

Remove duplicated methods. Remove some mostly unused methods,
and simplify some others.

Change-Id: I605b249e54417bb32c3dfc8e22f2c8b6b684a1e1
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoMove the definition of Object vtables into qv4object_p.h
Lars Knoll [Thu, 15 Jan 2015 20:02:40 +0000 (21:02 +0100)]
Move the definition of Object vtables into qv4object_p.h

Change-Id: I8dc15999e268d2d78691bf030b36cd09de1c4057
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoRemove all remaining usages of ValueRef
Lars Knoll [Thu, 15 Jan 2015 14:01:06 +0000 (15:01 +0100)]
Remove all remaining usages of ValueRef

Change-Id: Icd76d3d03fac2e57530e55f8ec15b97109dcdcbc
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoGet rid of most uses of ValueRef
Lars Knoll [Thu, 15 Jan 2015 10:36:57 +0000 (11:36 +0100)]
Get rid of most uses of ValueRef

Instead pass a const Value & into the functions

With our new inheritance structure, we can get rid of ValueRef
and instead simply pass a pointer to a Value again. Pointers to
Values are safe to use again now, as they are now guaranteed to
be in a place where the GC knows about them.

Change-Id: I44c606fde764db3993b8128fd6fb781d3a298e53
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoIntroduce Shortcut
J-P Nurmi [Thu, 1 Jan 2015 18:51:44 +0000 (19:51 +0100)]
Introduce Shortcut

[ChangeLog][QtQuick] Added a Shortcut utility type for catching
keyboard shortcuts

Change-Id: I4af631bfa7987f0d809b1f5af499f1d9688a1e04
Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
9 years agoQML: Fix MSVC 2013/64bit warnings.
Friedemann Kleint [Thu, 22 Jan 2015 08:38:22 +0000 (09:38 +0100)]
QML: Fix MSVC 2013/64bit warnings.

compiler\qv4ssa.cpp(687) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
compiler\qv4ssa.cpp(950) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
compiler\qv4ssa.cpp(1117) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
compiler\qv4ssa.cpp(1120) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
compiler\qv4ssa.cpp(1148) : warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data
compiler\qv4ssa.cpp(1266) : warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data
compiler\qv4ssa.cpp(1622) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
compiler\qv4ssa.cpp(2246) : warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data
compiler\qv4ssa.cpp(4289) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
compiler\qv4ssa.cpp(4351) : warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data
jit\qv4regalloc.cpp(1383) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
jit\qv4regalloc.cpp(1769) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
jit\qv4regalloc.cpp(1814) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
jsruntime\qv4mm.cpp(496) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
jsruntime\qv4mm.cpp(503) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
jsruntime\qv4mm.cpp(506) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
jsruntime\qv4regexp.cpp(60) : warning C4267: 'return' : conversion from 'size_t' to 'uint', possible loss of data
jsruntime\qv4typedarray.cpp(85) : warning C4309: '=' : truncation of constant value

Change-Id: I0b04e1a9d379c068fb3efe90a9db8b592061e448
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoQQuickText: respect new line width set by lineLaidOut() handler.
Dmitry Volosnykh [Wed, 21 Jan 2015 11:02:33 +0000 (14:02 +0300)]
QQuickText: respect new line width set by lineLaidOut() handler.

This commit makes text elide properly when custom layout is implemented.

Task-number: QTBUG-44025
Change-Id: Iefe344079c002d3a79aea18096a71667f6c17add
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
9 years agoRework QJSValue internals
Lars Knoll [Wed, 14 Jan 2015 15:22:33 +0000 (16:22 +0100)]
Rework QJSValue internals

Use a flagged pointer to either store a pointer to a
QV4::Value (from the persistent storage) or a pointer to
a QVariant in QJSValue::d. Like this we don't need to malloc
to create a QJSValue for most use cases.

Significantly reduces the memory consumption of QJSValue and
speeds it up a lot.

Change-Id: I10902cc4b6cc3f43d3f816875dc6c4bbb6b4490f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoAdd C++11 move operators, and a simpler internal constructor
Lars Knoll [Wed, 14 Jan 2015 11:50:34 +0000 (12:50 +0100)]
Add C++11 move operators, and a simpler internal constructor

Move semantics should optimize some copy operations on QJSValues,
and the internal constructor will simplify refactoring the
QJSValue class to get rid of the extra allocated private.

Change-Id: I24863b30523af2432aa81ad6b87fda7fe35749c4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoMove the internalClass pointer into Heap::Object
Lars Knoll [Tue, 13 Jan 2015 20:49:09 +0000 (21:49 +0100)]
Move the internalClass pointer into Heap::Object

The other classes that derive from Heap::Base don't need it
at all. So get rid of it there and save a pointer.

Change-Id: I9c5df2e43cd6eeac2e6e41f3d3b8077d3afbc8f2
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoGet rid of all uses of Managed::engine()
Lars Knoll [Sun, 11 Jan 2015 15:30:29 +0000 (16:30 +0100)]
Get rid of all uses of Managed::engine()

Change-Id: I596f14554d81f5e9af9996294d96047f2e810bef
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoRemove all the setVTable() calls that aren't required anymore
Lars Knoll [Sat, 10 Jan 2015 19:51:15 +0000 (20:51 +0100)]
Remove all the setVTable() calls that aren't required anymore

The memory manager's allocation methods now set this up correctly
for us :)

Change-Id: I8492bf732df601f95a1a851fb3804127ffc83935
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoRemove the remaining bit of code that use the vtable in the internalClass
Lars Knoll [Sat, 10 Jan 2015 19:35:18 +0000 (20:35 +0100)]
Remove the remaining bit of code that use the vtable in the internalClass

Change-Id: Ia52f0e6db325aab37477d455f163487b319dce29
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoIntroduce Flickable.OvershootBounds behavior
J-P Nurmi [Thu, 12 Jun 2014 18:23:10 +0000 (20:23 +0200)]
Introduce Flickable.OvershootBounds behavior

Related to QTBUG-38515. It is not always desired to allow dragging over
bounds even if flicking overshoots. This makes it possible to implement
collision effects for flicks, while a drag over bounds would still do
nothing.

[ChangeLog][QtQuick][Flickable] Introduced Flickable.OvershootBounds
behavior that allows content overshooting the boundary when flicked,
but does not allow dragging content beyond the boundary of Flickable.

[ChangeLog][QtQuick][Important Behavior Changes]
Flickable.DragAndOvershootBounds value changed from 2 to 3. This will
only affect you if you've worked around enum type checking and have
the integer value explicitly in your code.

Change-Id: I63c3540ab293a9c7c801d81220f74909d3fa1e17
Reviewed-by: Martin Jones <martin.jones@qinetic.com.au>
9 years agoQQmlData: More member reorganisation to remove holes.
Robin Burchell [Sat, 17 Jan 2015 22:11:20 +0000 (23:11 +0100)]
QQmlData: More member reorganisation to remove holes.

Drops size from 136 bytes to 128 bytes on x86_64.

Change-Id: I008f899539fcae8ad29b8978116e6dce2e10a40e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoModels: Remove QModelIndex metatype re-declaration
Gabriel de Dietrich [Fri, 16 Jan 2015 13:36:24 +0000 (14:36 +0100)]
Models: Remove QModelIndex metatype re-declaration

It's absolutely unnecessary.

Change-Id: Ib9e4077a8720b7f58886b85c4feabe18205ccb41
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
9 years agoQQmlValueTypeWrapper: Use QVariant to QString conversion if possible
Gabriel de Dietrich [Wed, 14 Jan 2015 19:54:13 +0000 (20:54 +0100)]
QQmlValueTypeWrapper: Use QVariant to QString conversion if possible

This makes it easier to customize displaying Q_GADGETs that don't
have a toString() function defined. Instead of having to define
a wrapper Q_GADGET class, it's more straightforward to register a
meta-type converter. Finally, it ensures consistent value displays
between QML and the rest.

Change-Id: I76f93ee0bafabd74f311130972b49c572b38f43f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoSend hover events also to QQuickItem::childMouseEventFilter
Jørgen Lind [Wed, 14 Jan 2015 08:41:23 +0000 (09:41 +0100)]
Send hover events also to QQuickItem::childMouseEventFilter

childMouseEventFilter already gets touch events, and it is logical to
send the hover events which are essentially mouse events. By also
sending hover events to the filter it allows an item to track the mouse.

Existing implementations of childMouseEventFilter should not be effected
by more events being sent to it as checking for the event type should be
practiced in all overloads.

Change-Id: Ie00aceef05e41e4e8f6d80007343c5a5b9f566cf
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoMove vtable out of internalClass
Lars Knoll [Sat, 10 Jan 2015 16:55:29 +0000 (17:55 +0100)]
Move vtable out of internalClass

We can move the internalClass to Object later on, and such save
having the internalClass on lots of Heap objects.

This commit basically adds and starts making use of a new
vtable pointer in Heap::Base. In addition, the construction
methods in the memory manager now automatically setup the
correct vtable.

Removing the vtable code from InternalClass and moving it into
Object will come in a separate commit

Change-Id: If49e8d73c769bf65bf47fe4dbf8b9546c8019dbc
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoRemove not required std::vector::reserve() calls
Lars Knoll [Tue, 20 Jan 2015 09:04:35 +0000 (10:04 +0100)]
Remove not required std::vector::reserve() calls

These actually force more reallocations of the vector than
required, and slow things down in practice.

callgrind shows that this saves around 7% of the total instruction
count for crypto.js

Change-Id: Ibd6114d84ade2b484a5261b53c3299f48f79e633
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoFix a bug in removeMember causing a duplicate transition with an 0 lookup.
Robin Burchell [Mon, 19 Jan 2015 15:26:54 +0000 (16:26 +0100)]
Fix a bug in removeMember causing a duplicate transition with an 0 lookup.

We shouldn't have taken a copy here. I'm not sure why I did that. Also sprinkle
Q_ASSERT fairydust around to try ensure that this doesn't happen again.

This was exposed when we started trying to delete the transitions again, which
were leaked in 6421f275286b3238fe1a7a5e909225251f3e8dbf.

Change-Id: Id9272db7f1863d1ccc5b1f48b6382c68ae0da9da
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoQV4::InternalClass: Fix a memory leak.
Robin Burchell [Mon, 19 Jan 2015 11:51:06 +0000 (12:51 +0100)]
QV4::InternalClass: Fix a memory leak.

Accidentally introduced in 6421f275286b3238fe1a7a5e909225251f3e8dbf.

Change-Id: I45d121a661ba403d1d4573f98fe0944f05319290
Done-by: Slava Monich <slava.monich@jolla.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoExpose QStyleHints as Qt.styleHints
J-P Nurmi [Fri, 2 Jan 2015 14:41:02 +0000 (15:41 +0100)]
Expose QStyleHints as Qt.styleHints

Change-Id: I0fc94e680b011963e645bdbf51110820751e53aa
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoQQmlData: Reorder fields to drop size from 144 to 136 bytes on x86_64.
Robin Burchell [Sat, 17 Jan 2015 00:37:19 +0000 (01:37 +0100)]
QQmlData: Reorder fields to drop size from 144 to 136 bytes on x86_64.

Change-Id: Icfeb5c27060731dfa79b48151b6dcb5484586708
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoQQuickParticleEmitter: Call particleCountChanged by hand on maximumEmittedChanged.
Robin Burchell [Mon, 12 Jan 2015 10:06:46 +0000 (11:06 +0100)]
QQuickParticleEmitter: Call particleCountChanged by hand on maximumEmittedChanged.

Analysis of QObject connections showed that a large number of connections were
set up to the particles system. As this particular case is cheap, we can do it
inline instead, and avoid the connection-per-instance.

Change-Id: Iec2049fff2c257dc39662ef2b5a8ecd75bbd870d
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoFix Qt.inputMethod ownership
J-P Nurmi [Wed, 14 Jan 2015 10:28:06 +0000 (11:28 +0100)]
Fix Qt.inputMethod ownership

Change-Id: Ic51f9daf17742a421a810d95b2a510caf657e08f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoImplement DefUses::Temps with a QVarLengthArray.
Robin Burchell [Sat, 10 Jan 2015 21:12:29 +0000 (22:12 +0100)]
Implement DefUses::Temps with a QVarLengthArray.

Avoiding heap allocations here shaves 100ms or so off the optimizer runtime.

Change-Id: If00c757532ffe90f2fa9c62dc999bb69e25bb71c
Task-number: QTBUG-43719
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
9 years agoDon't require an ExecutionEngine member in String anymore
Lars Knoll [Tue, 13 Jan 2015 16:22:08 +0000 (17:22 +0100)]
Don't require an ExecutionEngine member in String anymore

Change-Id: I7c1a5471507669871564d79dc17d1026c268b6d0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoRefactor persistent values
Lars Knoll [Mon, 12 Jan 2015 20:55:51 +0000 (21:55 +0100)]
Refactor persistent values

Use a page wise allocation mechanism for persistent
values. This significantly reduces memory consumption
of persistent values and also improves their performance
a lot.

Change-Id: I8499d2ca5bdd871e029f643ae605a94544558bb5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoQQuickItemParticle: delete delegates once they are completed.
Robin Burchell [Sun, 11 Jan 2015 19:41:38 +0000 (20:41 +0100)]
QQuickItemParticle: delete delegates once they are completed.

This was one gigantic memory leak, if anyone tried to use this functionality, as
evidenced by the bug. The comment notes that deletion was only to be done if the
items were created by the ItemParticle, but I don't think this makes sense:
take()'s documentation doesn't imply that the ownership of the item stays with
the creator, and nor does this seem to be a particularly sensible API decision
to make, so I'm not going to implement that.

Change-Id: I307d77b70c2b4f7b34565865f8efcfe64817be2f
Task-number: QTBUG-37486
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoDrop trailing vertices in GL_LINES and GL_TRIANGLES drawing modes.
Ulf Hermann [Mon, 12 Jan 2015 12:54:45 +0000 (13:54 +0100)]
Drop trailing vertices in GL_LINES and GL_TRIANGLES drawing modes.

This results in more correct behavior if you create nodes with a
number of vertices that doesn't match the drawing mode.

Change-Id: Ic0f59a4019a6b4087b527b7c9b38c35a9e02ece8
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoMerge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/staging/dev
Simon Hausmann [Fri, 16 Jan 2015 14:46:46 +0000 (15:46 +0100)]
Merge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/staging/dev

9 years agoAvoid an incorrect warning when dynamically parenting a Window
Jocelyn Turcotte [Thu, 15 Jan 2015 15:05:26 +0000 (16:05 +0100)]
Avoid an incorrect warning when dynamically parenting a Window

"Created graphical object was not placed in the graphics scene."
QQuickWindow is the root of a graphics scene and doesn't need to be
inside another one.

It is already suggested in the Window documentation that Window can
be an inline child of a top-level QtObject. This patch fixer the
warning when dynamically creating a Window component.

Change-Id: Ie6d9d37b9e9ffdb61101aaaad6f4b722216ec759
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoMerge remote-tracking branch 'origin/5.4' into dev
Simon Hausmann [Wed, 14 Jan 2015 11:00:56 +0000 (12:00 +0100)]
Merge remote-tracking branch 'origin/5.4' into dev

Conflicts:
.qmake.conf
src/qml/jsruntime/qv4context_p.h
src/qml/jsruntime/qv4debugging.cpp
src/qml/jsruntime/qv4engine.cpp
src/qml/jsruntime/qv4functionobject_p.h
src/qml/jsruntime/qv4qobjectwrapper.cpp
src/quick/scenegraph/shaders/visualization.frag
tests/auto/qml/qjsengine/tst_qjsengine.cpp

Change-Id: I492e8546c278f80a300a2129e9a29d861e144a30

9 years agoRedirect console.info to new QtInfoMsg
Kai Koehne [Fri, 12 Dec 2014 10:10:45 +0000 (11:10 +0100)]
Redirect console.info to new QtInfoMsg

Change-Id: I6f4560a3baae16dd6db090d51a577060689825ef
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoCheck for "c" being a nullptr in all places
Holger Hans Peter Freyther [Sun, 11 Jan 2015 07:56:56 +0000 (08:56 +0100)]
Check for "c" being a nullptr in all places

So either c is never a nullptr or there is a potential crash in
the grab code. Replicate the check from above.

Change-Id: I2c93502c026cdd92dc5d20e3d6d59e6f6f92a6ce
Fixes: Coverity CID 10628
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoAdd null check for target as well
Holger Hans Peter Freyther [Sun, 11 Jan 2015 07:53:58 +0000 (08:53 +0100)]
Add null check for target as well

I couldn't see any documentation for the implication that if
stackBefore is set then target must not be null. Coverity didn't
find that implication either.

Change-Id: Ifb93aa4c1e40f417033057b9a403d368dfdf0ba8
Fixes: Coverity CID 10627
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoRemove side-effect in assert
Holger Hans Peter Freyther [Sun, 11 Jan 2015 07:43:29 +0000 (08:43 +0100)]
Remove side-effect in assert

Fixes: Coverity CID 10587

Change-Id: I5101d209a54751532f48094f443afe35c6111e29
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoNo need to include qsgbatchrenderer_p.h from qquickwindow_p.h
Gunnar Sletta [Mon, 12 Jan 2015 13:35:24 +0000 (14:35 +0100)]
No need to include qsgbatchrenderer_p.h from qquickwindow_p.h

Change-Id: Iba97717ae8d485c217613475524a762949ea1dae
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
9 years agoMake sure we always have an engine when assigning to a Persistent
Lars Knoll [Tue, 13 Jan 2015 08:01:29 +0000 (09:01 +0100)]
Make sure we always have an engine when assigning to a Persistent

This prepares things for a rewrite of the internals of Persistent.

Change-Id: Ib93ec5911984d1bfce87ffdc3f86bc75f6ecafe9
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoFix flick() with ListView.SnapToItem at bounds.
Michael Brasser [Thu, 18 Dec 2014 16:20:37 +0000 (10:20 -0600)]
Fix flick() with ListView.SnapToItem at bounds.

Previously flick() would not always allow flicking to the very end of
a ListView if ListView.SnapToItem were set. Stop ListView from adding
overshoot, and then incorrectly correcting, if we are flicking exactly
to the end of a list.

Change-Id: Iad56e433bc1ba7d62f0553c4355469c9861df919
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
9 years agoUse a list of lists for free chunks instead of merging in one list
Jocelyn Turcotte [Fri, 9 Jan 2015 17:52:56 +0000 (18:52 +0100)]
Use a list of lists for free chunks instead of merging in one list

This remove the tedious merging of free heap slots into one big list
after sweeping. It now lets each chunk keep its 0-terminated list of
free items and by then linking chunks together in a list for those
containing at least one free item.

The chunk metadata is moved at the beginning of the allocated VM
region to avoid moving it all around while sorting
MemoryManager::Data::heapChunks.

Change-Id: Ia93c2eb7feca0779a28aea5149dd066dacbfa494
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoFix a harmless valgrind warning in RegExpObject
Jocelyn Turcotte [Fri, 9 Jan 2015 17:53:37 +0000 (18:53 +0100)]
Fix a harmless valgrind warning in RegExpObject

Only even values are initialized by the RegExp engine and the
compiler might reorder end to be tested before start, which would
let valgrind complain about branching on an uninitialized value.

Fix the issue by only checking if start is offsetNoMatch since it is
implied in the implementation that start == -1 => end == -1.
This matches the behavior of RegExpMatchesArray::reifyAllProperties in WebKit

Change-Id: Ifde1c5bc99da2a7929cd096bf477cae8799e4fed
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agodoc: The correct enum name is 'Time', not 'LastModified'.
Gunnar Sletta [Sun, 11 Jan 2015 15:38:19 +0000 (16:38 +0100)]
doc: The correct enum name is 'Time', not 'LastModified'.

Change-Id: I4e75b97e9e70a440a2e2ec96af04d004323f09bb
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
9 years agoImprove startup of bindings using QQuickScreen
Simon Hausmann [Wed, 29 Oct 2014 08:58:03 +0000 (09:58 +0100)]
Improve startup of bindings using QQuickScreen

We can optimistically initialize the underlying QScreen to the primary
screen and this way ensure that in the common case the evaluation of
bindings using the screen's attached properties results in correct calculations
on startup. This way we can avoid re-evaluating the bindings again later.

Previously on startup all the returned values were zero and the bindings got
evaluated again once a window was assigned.

Change-Id: I98ba5905953f0b5054d924919239d178570250d3
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoRename QML debug macro to Qt naming style
Pasi Petäjäjärvi [Wed, 17 Dec 2014 10:00:41 +0000 (12:00 +0200)]
Rename QML debug macro to Qt naming style

With this change the macro is in line with QT_NO_<feature> style
of naming macros. This way it will also be automatically added to
the file mkspecs/qmodule.pri in QT_NO_DEFINES value.

Change-Id: I96041438ef68bbcbc4e66301b0f5fe1212129c1a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
9 years agoV4 IR: move the MemberResolver out of IR::Temp.
Erik Verbruggen [Fri, 9 Jan 2015 13:17:31 +0000 (14:17 +0100)]
V4 IR: move the MemberResolver out of IR::Temp.

Temps are copied around a lot. This patch reduces the size by storing a
single pointer to the resolver.

Change-Id: I074b8b729fce310542cf4697ef42107085b304b3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
9 years agoAdd ability to retrieve QJSEngine for a given QObject
Simon Hausmann [Mon, 12 Jan 2015 12:07:38 +0000 (13:07 +0100)]
Add ability to retrieve QJSEngine for a given QObject

[ChangeLog][QtQml] Added qjsEngine(QObject*) getter similar to qmlEngine(object)
that allows retrieving the engine for an exposed object.

Change-Id: Id14adec58d45fe58133f65bab773b07d6bc18569
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoClean up renderer visualization a bit.
Gunnar Sletta [Mon, 12 Jan 2015 13:50:36 +0000 (14:50 +0100)]
Clean up renderer visualization a bit.

viewport was currently unused and adreno 305 was confused by
the tweak.w > 0.0 when the input was 0.0f, so write it
in a slightly more straightforward manner.

Change-Id: I101ff71dcb04ca531e91cc5522876d71f368cdc8
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
9 years agoQV4::String is not an Object
Lars Knoll [Mon, 12 Jan 2015 12:48:47 +0000 (13:48 +0100)]
QV4::String is not an Object

Remove all the code related to Object vtable's in here. This code
never got called anyway, as it would require casting to an Object
to call it (which would of course fail for Strings).

Change-Id: Ib62bb1b10999304cb65f6030d805698b9f60700d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoGet rid of Value::engine()
Lars Knoll [Sat, 10 Jan 2015 21:04:54 +0000 (22:04 +0100)]
Get rid of Value::engine()

This method is not guaranteed to return an engine. We're safer
checking for the value being an object first and then getting
the engine from there.

Change-Id: I5c95e675337e545f2421613bd31c42d1e58d6f9a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoV4 JIT: ARM: move registers around.
Erik Verbruggen [Thu, 18 Dec 2014 13:59:49 +0000 (14:59 +0100)]
V4 JIT: ARM: move registers around.

In 6572d4e50d73ac60a8974d07de74c27a7f99ebef we moved the
addressTempRegister to r10, and in
d8b276a59402cbbe6d070ba38805350e7f3dd8a1 we made sure that the YarrJIT
saves it too. JSC solved this by moving it to r6, which is already
saved by the YarrJIT. To make a future update of the assembler easier,
we also move it to r6.

This requires that we move our scratch register too. But, because it is
used a lot, we don't want it above r7 for Thumb2 reasons. Therefore, we
move the engine to r10, and the scratch register to r5.

Change-Id: I35be539940d9fe80971973cfa7f3a8dab2196a1e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoDisallow QQmlDebugServer::enable for QT_QML_NO_DEBUGGER
Ulf Hermann [Fri, 12 Dec 2014 13:53:09 +0000 (14:53 +0100)]
Disallow QQmlDebugServer::enable for QT_QML_NO_DEBUGGER

This mirrors the behavior of the QQmlDebugServer constructor.
Unfortunately we have two #defines to disable the debug server,
QT_QML_NO_DEBUGGER and QQML_NO_DEBUG_PROTOCOL. We should honor both of
them as people might rely on either of them to effectively prevent the
debug server from working.

Change-Id: I0bc0d48632eaa05c471d0afed6fc48436116746a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoMake opengl context current in context2d's toImage if necessary
Ulf Hermann [Mon, 17 Nov 2014 13:43:27 +0000 (14:43 +0100)]
Make opengl context current in context2d's toImage if necessary

With the basic render loop the scene graph thread is the render thread
and thus we don't get a different opengl context for context2d in
immediate/fbo mode. We have to make sure the opengl context is current
when we call flush() from functions exposed to JS.

Change-Id: Idd91cf1ce9c299a7645cf3b78d4498652376b17e
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoDefine vtable for CatchContext
Lars Knoll [Sat, 10 Jan 2015 16:16:10 +0000 (17:16 +0100)]
Define vtable for CatchContext

Change-Id: I987e38f843881137b4e3241f68ecdf5516f95515
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoMove extensible into the internal class
Lars Knoll [Fri, 9 Jan 2015 22:36:57 +0000 (23:36 +0100)]
Move extensible into the internal class

With this, we can now save one pointer per Heap
object.

Change-Id: I7f69193ff51c9fd9c5dbfba90aa1ebb3f93da2e6
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoFold the markBit into the internalClass pointer
Lars Knoll [Fri, 9 Jan 2015 21:02:40 +0000 (22:02 +0100)]
Fold the markBit into the internalClass pointer

Change-Id: I79f9286275f833dd01a3193042976d1f86ed5019
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoFold the inUse flag into the internalClass pointer
Lars Knoll [Fri, 9 Jan 2015 18:48:56 +0000 (19:48 +0100)]
Fold the inUse flag into the internalClass pointer

Revert the flag (ie. flag == 0 means the item is used), and fold it
into the second lowest bit of the internalClass/nextFree field.

Change-Id: I7b690fdce00d16aa538fa70a269a755511477c5c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoMove subType from Heap::Base into Heap::String
Lars Knoll [Fri, 9 Jan 2015 14:10:52 +0000 (15:10 +0100)]
Move subType from Heap::Base into Heap::String

This is the only place it's still being used

Change-Id: I7341986278b1ae47d898cae3df605a23b34eebe2
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoRemove subtype usage in ErrorObject
Lars Knoll [Fri, 9 Jan 2015 13:32:57 +0000 (14:32 +0100)]
Remove subtype usage in ErrorObject

Change-Id: I77e23516270a2330ec22215aef6782a38d7fca09
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoRemove the StringType_UInt subtype
Lars Knoll [Fri, 9 Jan 2015 12:56:47 +0000 (13:56 +0100)]
Remove the StringType_UInt subtype

It's not really used, and doesn't optimise anything really.
Additionally get rid of some code duplication.

Change-Id: I6502512e6df58db2c0264ea43d91a23c7585427c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoGet rid of subtype usage in Function objects
Lars Knoll [Fri, 9 Jan 2015 12:28:40 +0000 (13:28 +0100)]
Get rid of subtype usage in Function objects

Change-Id: Ic84ddab292cb69e79dac0f2b8a87b96b096360d8
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoGet rid of hasAccessorProperty in Heap::Base
Lars Knoll [Fri, 9 Jan 2015 12:13:04 +0000 (13:13 +0100)]
Get rid of hasAccessorProperty in Heap::Base

This shouldn't affect performance as we can just as well
check for cases where we need to take the slow path
differently.

Change-Id: I4b9f69c39e9e64b437820ca3a6ea43e8877f2cf3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoGet rid of the needsActivation flag in Heap::Base
Lars Knoll [Fri, 9 Jan 2015 11:30:01 +0000 (12:30 +0100)]
Get rid of the needsActivation flag in Heap::Base

Change-Id: Idcec374cb6d16aabf919c23d7236b76d9d047527
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoGet rid of the bindingKeyFlag
Lars Knoll [Fri, 9 Jan 2015 11:11:09 +0000 (12:11 +0100)]
Get rid of the bindingKeyFlag

Instead use the vtable to identify that we have a
binding function.

Change-Id: I794aebb6fb83f648ba36f2f15cad94d2af3cae91
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoStart cleaning up flags in Heap::Base
Lars Knoll [Fri, 9 Jan 2015 11:01:06 +0000 (12:01 +0100)]
Start cleaning up flags in Heap::Base

The goal is to get rid of the flags here and reduce
the size of each GC'ed object with a pointer.

Change-Id: I8c876810037756b85a646348cc5992a688588ea5
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoQML 3rdparty: revert unnecessary change.
Erik Verbruggen [Wed, 17 Dec 2014 12:25:22 +0000 (13:25 +0100)]
QML 3rdparty: revert unnecessary change.

It is the change to DataLog.h, which in turn forces the other changes in
order to match types.

Change-Id: Ie17e7efbd6a4d380a3b7383b0fd0243c6f68d0d5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoFix timing output from windows render loop
Laszlo Agocs [Thu, 8 Jan 2015 12:51:01 +0000 (13:51 +0100)]
Fix timing output from windows render loop

Print the frame time, not the total, and in milliseconds.

Change-Id: Ia7fe3bea8efafcce475c49517d7adab1b3841729
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoQV4: Use QVarLengthArray in cleanupBasicBlocks.
Robin Burchell [Sun, 21 Dec 2014 23:00:26 +0000 (00:00 +0100)]
QV4: Use QVarLengthArray in cleanupBasicBlocks.

Avoids heap allocations, drops around ~60ms off my morbid testcase in doing so.
QBitArray is still allocating, meaning this function isn't "free", but it's now
at 0.9% of runtime vs the 1.3% it was before, so something for another day.

Change-Id: Ie0db8e0312bde5f67b37250d04b4d65e1f0b034d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoFix compiler warning about use of uninitialized variable
Lars Knoll [Fri, 9 Jan 2015 10:51:03 +0000 (11:51 +0100)]
Fix compiler warning about use of uninitialized variable

Change-Id: Ic9218d82c5f47d464a6536759cfe2c6dbfc9f985
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
9 years agoAdd Window.width and Window.height attached properties
J-P Nurmi [Mon, 5 Jan 2015 20:00:40 +0000 (21:00 +0100)]
Add Window.width and Window.height attached properties

[ChangeLog][QtQuick] Added Window.width and Window.height attached
properties

Change-Id: I3ef590a0d3e6fa660ed88992d5ae843deb09c7bc
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
9 years agoTest: make mouse press, release, click and double click default to the center of...
Albert Astals Cid [Fri, 9 Jan 2015 09:49:47 +0000 (10:49 +0100)]
Test: make mouse press, release, click and double click default to the center of the item

Most of the times you just want to act on the item not caring the position.
This helps for cleaner test code

Change-Id: I0e8a4919c503e3fd6dee60e1bd937ac57622279f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
Reviewed-by: Michael Brasser <michael.brasser@live.com>
9 years agoPrint exceptions in JS slots
Kai Koehne [Mon, 5 Jan 2015 14:31:20 +0000 (15:31 +0100)]
Print exceptions in JS slots

Do print JS exceptions raised in slots to the console, and clear the
status afterwards. Otherwise exceptions raised might silently propagate
to later JS calls.

Change-Id: I122f3026aa18028415c5a4672cb3287e7d58ac4d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoQQuickGridMesh: Avoid a signal connection per mesh instance by just calling the signa...
Robin Burchell [Wed, 7 Jan 2015 21:00:00 +0000 (22:00 +0100)]
QQuickGridMesh: Avoid a signal connection per mesh instance by just calling the signal directly.

This can be instantiated a fair number of times, leading to a lot of signal
connections. Since the signal is so simple, just place a function call inline
and avoid unnecessary allocations.

Change-Id: I031245c46bf797898f22ed991d0e97d73728bdf5
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoV4 JIT: Hoist QVector allocation out of a loop.
Robin Burchell [Mon, 22 Dec 2014 14:32:06 +0000 (15:32 +0100)]
V4 JIT: Hoist QVector allocation out of a loop.

Use erase() each loop iteration, but preserve the underlying allocation.

Change-Id: I673766f5567794215465daa597a4839a4900450b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoQV4: Don't heap allocate blockNumbers.
Robin Burchell [Sun, 21 Dec 2014 21:55:24 +0000 (22:55 +0100)]
QV4: Don't heap allocate blockNumbers.

Analysis of the allocations in BasicBlockSet show a huge amount of time spent in
allocating and freeing BasicBlockSet, which involves heap allocations. Most of
the time, blockNumbers is tiny (at least in my testing) - 0 to 1 in size at
deletion time. By inlining the (small) array, we save a nasty penalty.

This shaves around 400ms off the optimizer phase of my morbid QML testcase.

Change-Id: I46319173b5408a0d7a1b9663fdc516c9e5ca410e
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
9 years agoQML: Remove unused field from struct.
Erik Verbruggen [Fri, 9 Jan 2015 09:44:31 +0000 (10:44 +0100)]
QML: Remove unused field from struct.

Change-Id: I574dd5de67038ecb2e4d81ed69ed535e3be9ea05
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoQML: fix uninitialized variable use.
Erik Verbruggen [Fri, 9 Jan 2015 09:40:19 +0000 (10:40 +0100)]
QML: fix uninitialized variable use.

/Users/erik/dev/qt5-dev/qtdeclarative/src/qml/qml/qqmlpropertycache.cpp:1539:5: warning: variable 'offset' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
    default:
    ^~~~~~~
/Users/erik/dev/qt5-dev/qtdeclarative/src/qml/qml/qqmlpropertycache.cpp:1544:15: note: uninitialized use occurs here
    *index -= offset;
              ^~~~~~

Change-Id: I92538c8a3cf2a192be4c62e29b06b2c940b6def5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoReplace InternalClass transitions hash with a sorted vector.
Robin Burchell [Thu, 8 Jan 2015 00:28:58 +0000 (01:28 +0100)]
Replace InternalClass transitions hash with a sorted vector.

In a reasonable test application, there were some 1697 transition entries. Out
of these, 1663 of them had only a single item. The remainder, with the exception
of three, had <10 items. Only one of these had a count of >50 items (86).

As can be seen, most of the time, transitions is usually quite sparsely
populated, so using a hash is a large amount of overhead considering there's
just a few elements. For the times when it isn't, the vector being sorted
should help take care of that.

Since transitions are never removed, we can use a similar trick to
ba690fb73864915b4a35bbec5b7dc134ff1dafd0 and use a sorted vector to store them.

Compared to the hash approach, this saved ~412kb according to malloc_stats on a
reasonably comprehensive test application. Coincidentally, this also improved
v8bench for me by ~10%.

Note that this undoes 132cdfa69cae45d0c02ea715ce58722bbcd57e73, but the
expectation is that the fewer allocations done by using a vector will outweigh
the need to reserve any specific allocation initially.

Change-Id: Iec57a7db7e9a60347c9683b1cb1598f6d9c866f7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoStabilize the drag related autotests for higher dpi displays
Lars Knoll [Fri, 9 Jan 2015 09:53:12 +0000 (10:53 +0100)]
Stabilize the drag related autotests for higher dpi displays

Higher DPI displays might have a larger StartDragDistance (at
least on X11), breaking the autotest on these displays.

Change-Id: I9768a245a7654665dd9f718100289e9416d8c855
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoFix grammatical error in Text and TextEdit documentation.
Mitch Curtis [Thu, 8 Jan 2015 15:48:01 +0000 (16:48 +0100)]
Fix grammatical error in Text and TextEdit documentation.

Change-Id: I6fd68166108a060931cd6bcd64ccd865d251a4c3
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
9 years agoRemove QQmlTrace. We have a real profiler.
Erik Verbruggen [Thu, 18 Dec 2014 09:37:22 +0000 (10:37 +0100)]
Remove QQmlTrace. We have a real profiler.

Change-Id: I50d981b277187327c2c63f8372f64db1300ed9ef
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoCleanup variant conversion code
Lars Knoll [Fri, 2 Jan 2015 14:07:35 +0000 (15:07 +0100)]
Cleanup variant conversion code

Make public methods proper members of the ExecutionEngine, and
move private methods into the .cpp file only.

Change-Id: I3ca49e39bb1c4e559a2c63346e6ae6cfa446147d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoMove the variant conversion methods from qv8engine to qv4::ExecutionEngine
Lars Knoll [Fri, 2 Jan 2015 13:37:26 +0000 (14:37 +0100)]
Move the variant conversion methods from qv8engine to qv4::ExecutionEngine

Change-Id: Ibd529ae5cc3ba06f46152e9daa9119a4e7a2561c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoThis method is only used one place, so inline it there
Lars Knoll [Thu, 1 Jan 2015 14:24:33 +0000 (15:24 +0100)]
This method is only used one place, so inline it there

Change-Id: Ia8b75965208c9687163ddaf982c4081c1ee504d4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoMake the remaining variant conversion methods static
Lars Knoll [Thu, 1 Jan 2015 13:25:08 +0000 (14:25 +0100)]
Make the remaining variant conversion methods static

And make most private as well

Change-Id: If215aba4985a5150aa5a901f2e50e31bf0afa709
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoRemove most v8engine references in xhr
Lars Knoll [Wed, 31 Dec 2014 15:15:42 +0000 (16:15 +0100)]
Remove most v8engine references in xhr

Change-Id: Ibbb38d57782f8566502852a2cb3cfd4a28f9dfc3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoRemove v8engine from qmlcomponent and canvas2d
Lars Knoll [Wed, 31 Dec 2014 15:03:34 +0000 (16:03 +0100)]
Remove v8engine from qmlcomponent and canvas2d

Change-Id: I575ba208de24ffe90bd02905aba67b0b08c5115e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoRemove v8engine dependency in localstorage
Lars Knoll [Wed, 31 Dec 2014 14:49:59 +0000 (15:49 +0100)]
Remove v8engine dependency in localstorage

Change-Id: I69616efe6629bcae154ff36f3e1aebd2dfa87aa4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoRemove v8engine dependency in the builtin functions
Lars Knoll [Wed, 31 Dec 2014 14:49:39 +0000 (15:49 +0100)]
Remove v8engine dependency in the builtin functions

Change-Id: If9d50709548a5295457a20907bdf5e1153f49071
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoRemove v8engine dependency from qqmllocale
Lars Knoll [Wed, 31 Dec 2014 12:26:48 +0000 (13:26 +0100)]
Remove v8engine dependency from qqmllocale

Change-Id: Ib6f51915c5a049592c2958624017eb2f8ad962d8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoMove extension mechanism over to use the v4 engine
Lars Knoll [Wed, 31 Dec 2014 12:21:39 +0000 (13:21 +0100)]
Move extension mechanism over to use the v4 engine

Change-Id: Ib329fc7bcae3c78d962a116f53b2244a71f81228
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoRemove v8engine usage in the value type provider
Lars Knoll [Tue, 30 Dec 2014 20:47:49 +0000 (21:47 +0100)]
Remove v8engine usage in the value type provider

Change-Id: I6b26a8249175a86c6e15d000b24ba3300e112715
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoClean up JS .import/.pragma directive scanning
Simon Hausmann [Fri, 5 Dec 2014 15:32:56 +0000 (16:32 +0100)]
Clean up JS .import/.pragma directive scanning

There's a scanner in QQmlJS::Lexer::scanDirectives that can parse those, so
let's get rid of extra parser that operates on a string. Instead this way we
can do the scanning all in one shot, avoid detaching a copy of the source code
string and (most importantly) bring the parser closer to the copy in Qt
Creator, which uses the directives approach to extract imports and pragma.

Change-Id: Iff6eb8d91a45d8a70f383f953115692be48259de
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
9 years agoTextEdit: fix construction time text cache
J-P Nurmi [Mon, 17 Nov 2014 11:36:30 +0000 (12:36 +0100)]
TextEdit: fix construction time text cache

QQuickTextEdit does not apply cached text to the underlying document
until component construction is complete. However, if text() was called
during the construction (eg. because of a binding), it would blindly
overwrite the cached text with (still) empty document content.

Task-number: QTBUG-41583
Change-Id: I6c5c1b6283d70d8a5ec2c8bd986095ee3c35a14c
Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
9 years agoRemove qv8engine usage in the contextwrapper
Lars Knoll [Tue, 30 Dec 2014 20:36:00 +0000 (21:36 +0100)]
Remove qv8engine usage in the contextwrapper

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