Simon Hausmann [Mon, 3 Feb 2014 12:30:06 +0000 (13:30 +0100)]
[new compiler] Cleanup empty string handling
Ensure that the empty string always has index 0, that simplifies the code in a
few places and makes it easier to check for the empty string in other places
where there's no access to the string pool itself.
Change-Id: Icd204aec478e8350ef3fee75d89bda1f88cffe26
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Tue, 4 Feb 2014 10:37:36 +0000 (11:37 +0100)]
Fix canvas tests after commit
439f31f128e70ecae16544ee7041695c60e0b2d6
We must make sure that the canvas is created somewhere in the item hierarchy of
a scene-graph initialized (thus visible) window. A Window { visible: true }
type of item is not sufficient, but we can simply use our testcase as
parent/associated item, because that one is equipped with a when: windowShown
condition.
Change-Id: I67a65208fae1a6fd953493eaa2898a324a6cc917
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Simon Hausmann [Tue, 4 Feb 2014 10:35:02 +0000 (11:35 +0100)]
Fix occasional crashes in canvas getImageData and other places
In some places we allocate custom array objects and in the constructor we call
setArrayType, which will allocate the array's data through the GC. In all of
these cases we need to make sure that the array object itself is protected from
garbage collection, because while in the constructor it may not be yet in the
scope the callee has usually set up.
Change-Id: I96b7af4ae00fd809067e12bacd6563984c5e9240
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Ulf Hermann [Tue, 4 Feb 2014 09:20:30 +0000 (10:20 +0100)]
Set breakpoints before connect() in JS debugging unit test
connect() starts the JS engine. Any break point set after that may be
missed because the engine has already passed its location when the
breakpoint request arrives. The problem can easily be visualized by
inserting an artificial delay (e.g. sleep(1)) between connect() and
setBreakpoint().
I'm also removing a piece of dead code that gets that wrong and has
never actually worked.
Change-Id: Ie4410ac3eaf89f02993c653b17148c14048652ab
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Gunnar Sletta [Wed, 4 Dec 2013 14:44:57 +0000 (15:44 +0100)]
Support batching of rotated antialiased elements.
Change-Id: I67d961f23941ba5cfa16fd679b609cd0fc3071c7
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Thiago Macieira [Sun, 2 Feb 2014 22:01:26 +0000 (14:01 -0800)]
Normalize signal & slot signatures in connection
Profiling shows Qt Creator spends 2% of its load time normalizing
Change-Id: I58132e11ab5fc942b04925c3bcc919165784a5d1
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Simon Hausmann [Wed, 29 Jan 2014 09:39:00 +0000 (10:39 +0100)]
Add missing export macro to QQuickTransform
Task-number: QTBUG-34736
Change-Id: Ic0ab7317c76417e6556bc0b26cad50416ba06e54
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Simon Hausmann [Sun, 2 Feb 2014 21:06:11 +0000 (22:06 +0100)]
Fix nasty bug in property cache leading to inaccessible signal parameters
The property cache among other things caches the parameter types and names
of signals (instead of retrieving them from the meta-object each time). When
this cache is created through createArgumentsObject(), the parameter names have
to be provided, but the signature didn't enforce that because of the parameter
names having a default value of an empty list. All call sites however provided
the correct list, except for one in QQmlPropertyCache::methodParameterTypes.
Consequently tst_qqmlecmascript::threadSignal() would fail occasionally because
the first time this cache was "created" was when the "done" signal was emitted,
which caused QQmlBoundSignalExpression::evaluate to call methodParameterTypes. If
the signal data had not been cached so far, a new cache with an empty parameter
name list was created.
Later (in the second half of the test) a new signal handler was compiled and
the property cache reported that the signal took no parameters.
Change-Id: I19230d0fb1ddd54992f3d6251f82c489626662e7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Sun, 2 Feb 2014 19:38:13 +0000 (20:38 +0100)]
[new compiler] Propagate JS code gen errors
Change-Id: I3b99f3fc762df7ac820b26597bf809a80849b5ce
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Sun, 2 Feb 2014 19:36:39 +0000 (20:36 +0100)]
[new compiler] Fix error reporting for invalid regexp property assignments
After recordError makes sure to return false to indicate the error condition
to the caller.
Change-Id: I7edcda9ea4c6898f1607824085b150dbe295aeb2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Sun, 2 Feb 2014 19:15:47 +0000 (20:15 +0100)]
[new compiler] Fix context sharing for imported JS files that have no import themselves
They should share the imports from the importing context, which means
context->importedScripts needs to be initialized before calling
scriptValueForContext, because it accesses it.
Change-Id: Ifed22555028e03d597954ba1a18e546bfb901c58
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Sun, 2 Feb 2014 10:37:15 +0000 (11:37 +0100)]
[new compiler] Fix sanity checking of parameter names when connecting to C++ signals
Change-Id: Ie2dc8689786a61fe5f38a0f91ff86f011e965b2d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Sat, 1 Feb 2014 14:01:06 +0000 (15:01 +0100)]
[new compiler] Fix revisioning
Always install the property cache on the ddata, not only for types with
a VME meta object, as the cache has the correct revision cache.
Change-Id: I82352df867c1045b37152013eb924aafde2ee874
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Sat, 1 Feb 2014 13:39:44 +0000 (14:39 +0100)]
[new compiler] Allow function calls during initial binding evaluations and signal handlers
Functions need to be setup first, like in the VME.
Change-Id: I4d1cffa04cb2b3ba7027c3720d55133253a1bad7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Sat, 1 Feb 2014 07:51:19 +0000 (08:51 +0100)]
[new compiler] Fix error message about final property overrides
Change-Id: Icb8c2dfc633a6c322d4448ce18e3c01e0311b0f4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 31 Jan 2014 15:01:10 +0000 (16:01 +0100)]
[new compiler] Fix error messages when trying to create invalid property interceptors
Change-Id: I3dd608bfceb04323f92503596b87bbcb4bf582fc
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 31 Jan 2014 14:42:20 +0000 (15:42 +0100)]
[new compiler] Fix error message when assigning lists to singular properties
Also adjust the error message for the other compiler when trying to assign
lists to script strings.
Change-Id: I50f833c340f3634a59c5b36f30aeafc53003e65e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 31 Jan 2014 14:23:30 +0000 (15:23 +0100)]
[new compiler] Don't allow setting the id property multiple times
Change-Id: Ic7f1938dd048db6c6975d78ad4f69d3c646cece5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 31 Jan 2014 14:09:46 +0000 (15:09 +0100)]
[new compiler] Fix error messages for binding vs. property declarations
Separate binding errors from property declaration errors - they were
accidentally mixed up.
Change-Id: Id2d5134dc98ee3e1d7ce0c3d356f165e144e0d82
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 31 Jan 2014 13:00:53 +0000 (14:00 +0100)]
[new compiler] Cleanups
When creating the initial object tree from the AST, encapsulate the
declarations and bindings in the QmlObject class, in order to centralize the
redirection via declarationsOverride as well as the error handling. This also
replaces the hashes to detect duplicate properties/signals from being QString
based to simply use the existing string indices from the compilation unit.
Change-Id: Ia6ceae56977a98b5c5a7a738bf983a731e608d46
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 31 Jan 2014 11:33:26 +0000 (12:33 +0100)]
[new compiler] Fix invalid id error messaging for empty IDs
When an ID is specified as string literal, which is empty, don't try to
take the literal quotes as ID. Instead it's empty and so an error needs
to be thrown.
Change-Id: I9b42295a33dceb3cc9e57456908c65bbc12eb296
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 31 Jan 2014 11:18:51 +0000 (12:18 +0100)]
[new compiler] Try to resolve qualified enums at type compile time
... by taking some code from the old compiler. This speeds up some bindings
and maintains compatibility.
Change-Id: If80b1e28214cb655f70fff01a8c885edcb2d3030
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 31 Jan 2014 08:42:27 +0000 (09:42 +0100)]
[new compiler] Fix location reported on function declaration errors
Change-Id: I7549930a1152c257b3da6951afefef5d8b783f32
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 31 Jan 2014 08:37:10 +0000 (09:37 +0100)]
[new compiler] Fix datetime property conversion to match 5.1/5.2 behavior
Change-Id: I22c3e3f8e9a06928a23700b657a656a0db37d48d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 31 Jan 2014 08:26:16 +0000 (09:26 +0100)]
[new compiler] Fix signal handlers that are fuzzily matched
Use the same logic at object creation time as during the signal handler
conversion phase.
Change-Id: Idb48a3849da7b6543ec50c15e1ccbf2939c3ee39
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 30 Jan 2014 16:07:23 +0000 (17:07 +0100)]
[new compiler] Fix location when reporting signal declaration errors
Change-Id: Iaddb51cb7b0e28048761b98d6e48c70723cd5d00
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 30 Jan 2014 15:41:22 +0000 (16:41 +0100)]
[new compiler] Fix signal handler parameters for overloaded signals
When extracting the parameters for a signal, make sure to pick the
original variant that has all the parameters.
Change-Id: Ie28cb75ce32d8840812884ce2eef2934d473466c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 30 Jan 2014 12:31:14 +0000 (13:31 +0100)]
[new compiler] Add support for signal handler objects
Change-Id: I644dcea86fa886a6a2dc7cd230ad6942d165c4c5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Tue, 28 Jan 2014 09:41:58 +0000 (10:41 +0100)]
[new compiler] Fix property declarations inside group properties
Property declarations inside group properties as well as their initializers go
into into the surrounding object.
Change-Id: I5b2b0f7bc41daea1275eb17ed04560e17052ca42
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 29 Jan 2014 07:55:02 +0000 (08:55 +0100)]
[new compiler] Fix location of errors in group property objects
Change-Id: I63aa43ec7d9e90c1593c54dfc44890330c8669ae
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Tue, 28 Jan 2014 15:24:15 +0000 (16:24 +0100)]
[new compiler] Fix recursive property validation across component boundaries
Change-Id: Ia2a6e9de534fcc4e3780544ad0d5708e656e11a1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Gabriel de Dietrich [Sun, 2 Feb 2014 11:34:00 +0000 (12:34 +0100)]
alloca() is declared in stdlib.h on BSD systems
... except on Darwin.
Bonus change: Updated auto-tests trying to include 'alloca.h'.
This is a follow up on
24c43a5748b8502.
Change-Id: I299de00bf0dca7842470b158282daea221a10f2d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 31 Jan 2014 13:58:14 +0000 (14:58 +0100)]
Use lookups for get/setElement in the interpreter
Significantly speeds up crypto.js
Change-Id: Icd3d59bea3fe4427e93e9e10e3526178e8de859c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 31 Jan 2014 13:29:02 +0000 (14:29 +0100)]
Remove unused macro
Change-Id: Ie7044aecad59197fd2cab17d5ddcc7c44ad2ad84
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Sat, 25 Jan 2014 21:13:44 +0000 (22:13 +0100)]
Move ValueRef into qv4value_p.h
The ref class belongs logically together with the value.
Change-Id: I40c0908715cbc8b2a5c51d2544cb06fcd8e25365
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Sat, 25 Jan 2014 20:59:15 +0000 (21:59 +0100)]
Disentangle some includes
ScopedValue should require less dependencies. Hopefully we can then
move it together with the main class definition at some point (ie.
move ScopedValue int qv4value_p.h; similar for the other types).
Change-Id: Ie7b31715cb718a90dba40845c7ae785a29855062
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Sat, 25 Jan 2014 20:41:31 +0000 (21:41 +0100)]
Move Encode into qv4value_p.h
This is where the class logically belongs.
Change-Id: I366013aad2c9b6324ae82ab5f3250f1d9c719da4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 24 Jan 2014 21:55:39 +0000 (22:55 +0100)]
Cleanups
Remove SafeValue, it was used to port over to an exact GC. Since
we now have that, we can now safely merge it with QV4::Value
again. Also rename SafeString to StringValue for better naming
consistency.
Change-Id: I8553d1bec5134c53996f6b0d758738a0ec8a2e4d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 24 Jan 2014 21:13:06 +0000 (22:13 +0100)]
Get rid of the SafeObject class
Having SafeValue is enough, and we can pass an ObjectRef instead
of a SafeObject * for function calls.
Change-Id: I4e1435105403f8091b43eeda01303f9602c74235
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 24 Jan 2014 21:11:16 +0000 (22:11 +0100)]
Move ArrayElementLessThen to qv4arraydata.cpp
This is the only place the class gets used.
Change-Id: Iebb0cba7af30c1b2da68f67596c349d5e20c5053
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 24 Jan 2014 14:07:34 +0000 (15:07 +0100)]
Rename some files
Rename qv4value_def_p.h -> qv4value_p.h and qv4value_p.h to
qv4value_inl_p.h.
It makes more sense to have the class definition in the file
that is named after the class and move the inline methods into
a _inl file. Doing this now, as I expect we'll be needing a few
more _inl files soon.
Change-Id: Ib59e9380e9e976254c6b4369574157f39b1b5f51
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 24 Jan 2014 12:16:55 +0000 (13:16 +0100)]
Implement Lookup::indexedSetter
use this instead of the generic runtime method. This gives
around 10% speedup for array heavy Javascript such
as crypto.js.
Change-Id: Ic8f478c5b18893f2ef49e3f658b1ef24ae22e64f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 24 Jan 2014 11:46:28 +0000 (12:46 +0100)]
Fix a bug in qmljs_set_element and improve it's performance
Avoid expensive function calls for setting indexed properties
in the common case. The spec requires us to read the value before
writing it to check whether it's empty. In that case we need to
fall back to the slow implementation that checks the proto chain.
Change-Id: If278ba81f170d35c18135d2f8661459262e7e606
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Ulf Hermann [Thu, 30 Jan 2014 17:21:18 +0000 (18:21 +0100)]
Be stricter about the number of messages when testing profiler service
It's better to fail a test than to crash on invalid array access later.
Change-Id: Ia3d24218eba80f362908979720657312c8c6cd67
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Ulf Hermann [Thu, 30 Jan 2014 11:19:13 +0000 (12:19 +0100)]
Make the QML debug server thread safe
Previously, if instance() was accessed concurrently we could run into
various problems as the initialization wasn't synchronized. By putting
most of the initialization into the constructor, wrapping it into a
Q_GLOBAL_STATIC and discerning between accesses that need to wait for
the initial "hello" packet and ones that don't the situation is
improved.
Change-Id: I182e8e6abf054b851ef7ea5f897d4a197a9da4bf
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Ulf Hermann [Thu, 30 Jan 2014 12:34:21 +0000 (13:34 +0100)]
Make QML import thread safe.
Protect the common qmlEnginePluginsWithRegisteredTypes by a mutex.
Task-number: QTBUG-36542
Change-Id: Ia3c731f030b778d862239486cc6c1bfa441503e6
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Erik Verbruggen [Mon, 27 Jan 2014 14:09:12 +0000 (15:09 +0100)]
V4: remove unused field.
Change-Id: Ic62ac6be99b79aa2f8c37fc386fef6b04b480247
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Gunnar Sletta [Sat, 7 Dec 2013 08:41:44 +0000 (09:41 +0100)]
Visualization modes for rendering.
There are two ways of setting this right now. One is to set it on
startup using an environment varible.
QSG_VISUALIZE=
"batches" - Visualize batchtes in the renderer. Merged batches are
drawn with solid color and Unmerged batches are drawn with a diagonal
line pattern. Few unique colors means good batching. Unmerged batches
are bad if they contain many individual nodes.
"clip" - Visualize clipping as red areas on top of the scene.
"overdraw" - Visualize all items in 3D to highlight overdraws. This mode
can also be used to detect geometry outside the viewport to some
extent. Opaque items are rendered with a green tint while translucent
items are rendered with a red tint. The bounding box for the viewport
is rendered in blue. Opaque content is easier for the scenegraph to
process and it can also be faster to render on some hardware.
"changes" - Changes in the scenegraph are visualized with a flashing
overlay with a random color. Changes on a primitive is visualized with
a solid color while changes in an ancestor, such as a matrix or
opacity changes is visualized with a pattern.
The second way to set the visualization mode is to set it at runtime
through QString QQuickWindowPrivate::customRenderMode. This "API" is
string based so it is not tied to the batch renderer and in theory can
support other custom renderers.
The visualized elements do not respect clipping and rendering order
is arbitrary.
Change-Id: I31efbe53fc905145bf48080ede3e36945cb60dcf
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Ulf Hermann [Thu, 23 Jan 2014 09:39:51 +0000 (10:39 +0100)]
Change QQmlProfilerService::instance to be a getter
Change-Id: Id2eb973443cc73aac3a06f94c98b52334d9766a3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Ulf Hermann [Wed, 29 Jan 2014 16:30:14 +0000 (17:30 +0100)]
Allow debug plugin registrations from other threads than main GUI
There's no real reason to disallow that. The only thing we want to check
there is that the registration doesn't take place in the debugger
thread. Disallowing registrations from anywhere but the main GUI thread
creates unnecessary problems with threaded QML profiling and debugging.
Change-Id: Ic72d19237e2ddba02cc88f7f5a0743f6640fed4d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Ulf Hermann [Wed, 29 Jan 2014 15:33:39 +0000 (16:33 +0100)]
Properly wait for stdout in test
Assuming all output is available on the first readyReadStandardOutput()
signal leads to flaky test results.
Change-Id: I442d7edc905abc067d6c32a4a55afd42ed03e3c9
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Eskil Abrahamsen Blomfeldt [Wed, 29 Jan 2014 09:01:03 +0000 (10:01 +0100)]
Add test for shaping and rendering Sinhala text
This is currently broken on Mac OS X, but the fix is nigh.
Task-number: QTBUG-36056
Change-Id: I547f7961a2ca8c62301e15de486a6f75de26bc4a
Reviewed-by: aavit <eirik.aavitsland@digia.com>
Simon Hausmann [Mon, 27 Jan 2014 15:55:49 +0000 (16:55 +0100)]
[new compiler] Avoid uncreatable type errors for types that aren't created
QtQuick.Keys for example is not creatable, but it's also never created but
only used as attached properties. Therefore types used as attached properties
create the needCreation = false flag in the referenced types.
Change-Id: I6ca3a3ff677858bf3c55d3e08a0f0fc8ee9160fe
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Mon, 27 Jan 2014 15:00:54 +0000 (16:00 +0100)]
[new compiler] Fix timing of property assignment error handling
Most property assignment errors are now handled at type compile time, just
like in the old compiler. This speeds up the object creation code and
restores behavior expected in the qqmllanguage tests.
Change-Id: If213cd0bfa4dd51d9065c27809a79a6495c9f3ce
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
J-P Nurmi [Wed, 22 Jan 2014 13:38:43 +0000 (15:38 +0200)]
Expose TextEdit::linkAt(x, y)
[ChangeLog][QtQuick] Added TextEdit::linkAt(x,y) method.
Task-number: QTBUG-18946
Change-Id: Id9d061e6c9d857c2f0283ad5042097828d1ed02d
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
J-P Nurmi [Wed, 22 Jan 2014 12:21:46 +0000 (14:21 +0200)]
Expose Text::linkAt(x, y)
[ChangeLog][QtQuick] Added Text::linkAt(x,y) method.
Task-number: QTBUG-18946
Change-Id: I3b4071c6117ac0ee636f2fdbd2c392eb05b02dd7
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Friedemann Kleint [Tue, 21 Jan 2014 08:15:49 +0000 (09:15 +0100)]
Skip animations tests for MinGW.
These tests typically fail in the CI.
Task-number: QTBUG-36290
Change-Id: I36a19c2914932d4f70c1df24e1c5ad4a3d0e2795
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Lars Knoll [Mon, 27 Jan 2014 13:43:30 +0000 (14:43 +0100)]
Update TestExpectations
These tests started failing after the upgrade to Unicode 6.3
in qtbase. The reason is that a character in the mongolian range that
is being used in some tests changed character class from whitespace
to being a control character.
Change-Id: I4683d6db239fa0c3d213057dc363650420c1104d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Mon, 27 Jan 2014 12:09:01 +0000 (13:09 +0100)]
[new compiler] Report errors when trying to bind to read-only properties
The only exception are initializers for read-only property declarations.
Also adjusted the error location of one test to point to the correct value
location as opposed to the property location, as with all the other similar
errors.
Change-Id: I2333d3c485fc374b1b39a5f5a4408af5cf08a20f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 24 Jan 2014 15:49:03 +0000 (16:49 +0100)]
[new compiler] Improved error handling
* When reporting errors with literal bindings, use the correct location for the report,
the place where the literal value is declared.
* Create property caches for group properties, so that later in the property
validator we can do extra checks
* Report an error when trying to declare an object to the default property of a group
property
* Similarlyl report an error when trying to use sub-objects with value type properties
* Temporarily change tst_qqmllanguage::errors() to also try to instantiate the component,
because for the moment some errors are only reported at instantiating time instead of
compile time. That'll be fixed later when move checks get moved into the property validator.
Change-Id: Icaa8d2edc7918c03001c40fba7880ee5cac10e69
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 24 Jan 2014 12:13:58 +0000 (13:13 +0100)]
Improved error handling for namespaced property bindings
A binding with a qualified name that starts with a name space, must be followed
by a type. For example
MyNamespace.someThing.foo: 100
is not valid, something must be a valid type name and therefore start with an
upper case letter. Similarly an object declaration like this:
MyNamespace.something {
...
}
is not valid neither. The current compiler reported the latter as "Expected type"
and the former as "Invalid attached property name". The message for the latter
is not very good, because we know that "MyNamespace" is a namespace and therefore
"something" cannot be a attached property name, it must be the attached property
type first.
In the new compiler this hits the same code path and thus the same error message.
So this patch introduces the correct error message in the new compiler, adjusts
it for attached properties in the old one and adjusts the test that now passes
with both.
Change-Id: I51c265a2acb80079c1dd62ef5ef77d5ff07d3ac1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Tor Arne Vestbø [Mon, 27 Jan 2014 14:15:12 +0000 (15:15 +0100)]
Move logic for determining native vs. DF text into single factory function
Makes QSGContext::createGlyphNode() the central point of determining which
glyph node to produce, instead of letting the caller call two different
versions of the factory, each one calling the other in various cases and
behind various ifdefs.
Change-Id: I30fb17cceab45d9e13ddf3ece7a65f220c5e5acd
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Tor Arne Vestbø [Mon, 27 Jan 2014 13:34:10 +0000 (14:34 +0100)]
Allow renderType: Text.NativeRendering on retina displays/devices
Setting the renderType to Text.NativeRendering might be needed in some
cases where distance-field does not produce the expected results, such
as for emoji characters or really large fonts. These use cases are
valid on retina displays as well, so having the setter second-guess
the request from the user to use native rendering is not ideal.
Change-Id: I7c6049766e60574487c29de07fbd5c100ec69a2a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Ulf Hermann [Mon, 27 Jan 2014 15:05:49 +0000 (16:05 +0100)]
Make sure a profiling range is started for every handled signal
If we allow an endRange() without a startRange() before the range
nesting can get confused. Also, it's enough to check the existence
of the profiler once.
Change-Id: I255675d6e23505b6f29196c0470892f6d778e7b4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Frederik Gladhorn [Fri, 10 Jan 2014 15:36:05 +0000 (16:36 +0100)]
Accessibility: add states to QQuickAccessibleAttached
This makes it possible to set the state of accessible objects in qml.
Change-Id: Ide70b885dac8fed180d2b221540cf2b699ac78ff
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Simon Hausmann [Fri, 24 Jan 2014 11:01:33 +0000 (12:01 +0100)]
[new compiler] Fix support for namespaces in attached properties
When doing
import QtQml 2.0 as MyQml
with
MyQml.Component.onComplete: ...
We now store "MyQml.Component" as one string as the type name, in order to get
resolved correctly.
Change-Id: I11a6def88bcb8b98b5fa9548053e27fb58170e62
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 24 Jan 2014 17:27:50 +0000 (18:27 +0100)]
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Simon Hausmann [Fri, 24 Jan 2014 15:37:45 +0000 (16:37 +0100)]
Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
src/imports/dialogs/qquickmessagedialog.cpp
src/imports/dialogs/qquickmessagedialog_p.h
src/qml/debugger/qqmlprofilerservice_p.h
src/qml/jsruntime/qv4regexpobject.cpp
tests/auto/qml/debugger/qqmlprofilerservice/qqmlprofilerservice.pro
Change-Id: Ic8a43366b44d6970966acbf03b206d0dee00c28d
Friedemann Kleint [Fri, 24 Jan 2014 14:16:10 +0000 (15:16 +0100)]
Fix MSVC-warnings about double to float truncation in QML-tests.
Change-Id: Ie58585ca3555f0f7808b59221a00763cc702863a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Friedemann Kleint [Fri, 24 Jan 2014 13:56:57 +0000 (14:56 +0100)]
Fix MSVC-warning about unused variable in tst_qqmlapplicationengine.cpp
Change-Id: I808e56db47d3967f4361cb8b96644834fafb533a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Fri, 24 Jan 2014 13:29:40 +0000 (14:29 +0100)]
Allocate the ArrayData object and it's data together
Reduce the amount of allocations required for Arrays, and
allows freeing the array data more easily in the GC.
Change-Id: I3e3213f089c45c83a227038ce444aa60b2735b7f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Wed, 22 Jan 2014 14:25:50 +0000 (15:25 +0100)]
Change virtual methods in ArrayData to take Object pointer
Pass a pointer to the underlying object instead of the ArrayData
to virtual methods that modify the arrayData. This prepares
for allocating the ArrayData together with the array itself.
Change-Id: I66fe187f8b1e4d382ab243a518dbde5f18a1d16d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Jorgen Lind [Thu, 23 Jan 2014 11:22:43 +0000 (12:22 +0100)]
Dont define CAN_BACKTRACE_EXECINFO when building on uClibc
Change-Id: I06314f0a3a7cf86e5e627c307a522069cf640f78
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Simon Hausmann [Wed, 22 Jan 2014 15:40:46 +0000 (16:40 +0100)]
[new compiler] Fix error message when trying to create uncreatable types
Pass along the no-creation-reason properly, for regular qml types as well as
singleton types. Also don't collect custom signal parameter names as types to
resolve, as we never try to instantiate them anyway. Their type resolution to
meta-type id is done lazily when building the meta-objects.
Change-Id: I49bd51d9b851cf75cbd51afbcee168944f4350cd
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Sun, 19 Jan 2014 13:40:25 +0000 (14:40 +0100)]
[new compiler] Fix crash in loading qtquick controls
Don't create meta-objects for attached properties or group properties by
default.
Change-Id: Ie6263ae45e0186cf0489b45aafe4b951d336550a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Andrew Knight [Tue, 5 Nov 2013 22:23:44 +0000 (00:23 +0200)]
Fix build on WinRT
Disable JIT and avoid unsupported functions under WinRT.
Also add MSVC's ARM flag to the double conversion white list.
Cherry-picking commit
eeabbf554880f61979fa0a9ecf87ba380cd70863 on top of rebased double-conversion code
Change-Id: Iec899efc9de412bc61172ef6e2a15cd7da12fd03
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Erik Verbruggen [Fri, 1 Nov 2013 11:38:32 +0000 (12:38 +0100)]
Fix various compiler warnings in order to remove warn_off in the near future
Cherry-picking commit
a79e400 on top of rebased double-conversion code
Change-Id: I818fec877ee22d31e7aec6463fb5fbf986433339
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Sergio Martins [Sun, 25 Aug 2013 20:08:13 +0000 (21:08 +0100)]
wince: Build fix, Windows can also run on ARM.
Cherry-picked commit
96d950c4d0ea058e92b668dbdea3d91a89985efe on top of rebased double-conversion code
Change-Id: Iac3733b425d63bfbd027c16de7bf24b23262adc9
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Sérgio Martins [Thu, 29 Aug 2013 09:17:12 +0000 (10:17 +0100)]
wince: Build fix, assert() is not present in this platform.
Cherry-picking commit
e88a447 on top of rebased double-conversion code
Change-Id: I62d4b152f8551adc9eebd5e23424b44e0a90a256
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Sergio Martins [Sun, 25 Aug 2013 19:13:55 +0000 (20:13 +0100)]
wince: Build fix, abort() is not available on this platform
Cherry-picking commit
23919b3 on top of rebased double-conversion code
Change-Id: If0a6bf38fa707acd500c0ed84651d116056c5904
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Simon Hausmann [Wed, 22 Jan 2014 11:53:09 +0000 (12:53 +0100)]
Update our double conversion code to the latest release from code.google.com
This fixes AArch64 builds and brings us in sync with upstream commit
2fb03de56faa32bbba5e02222528e7b760f71d77
Task-number: QTBUG-35528
Change-Id: Ib356627e06c1fecaa5b3f66d0a98fb5b30dc87e5
Reviewed-by: Liang Qi <liang.qi@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Lars Knoll [Fri, 24 Jan 2014 09:01:55 +0000 (10:01 +0100)]
Don't write into the callers stack frame
Never usee addressForArgument when arguments are passed
in registers, as it points into the callers stack frame.
The address was used as a temporary location when encoding
a unsigned return value. The code has now been rewritten to
only use registers instead.
Change-Id: Id85b668a5a74dbd6c41621a9672e53a1cb5f242b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Fri, 24 Jan 2014 09:21:32 +0000 (10:21 +0100)]
Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable
Erik Verbruggen [Fri, 17 Jan 2014 15:13:08 +0000 (16:13 +0100)]
V4: fix life-time hole check.
This check was incorrect when a jump happened from before (or after) the
life-time interval into a life-time hole.
Change-Id: Idacf304a96d39f372249a48e18b00891531d9859
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 24 Jan 2014 09:20:48 +0000 (10:20 +0100)]
Merge remote-tracking branch 'origin/release' into stable
Change-Id: I4b0f2d63aff78b50656a519c088afc4a076747f7
Lars Knoll [Mon, 20 Jan 2014 15:01:26 +0000 (16:01 +0100)]
Turn ArrayData into a Managed object
Memory manage ArrayData. Once the ArrayData is moved
to be inline inside the object, this will save quite
some time for allocating and freeing arrays.
Change-Id: I19a520161d41bfe3d83f377af0b41db4ac5b99e4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Wed, 22 Jan 2014 11:38:31 +0000 (12:38 +0100)]
Fix compile error with clang 3.4
Change-Id: Iaf43f0527142bb5615e8c97bb1a80faf7b8b2e00
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Friedemann Kleint [Thu, 23 Jan 2014 09:22:10 +0000 (10:22 +0100)]
Fix warning about comparing double to boolean in js_equal().
jsapi\qjsvalue.cpp(749) : warning C4805: '==' : unsafe mix of type 'double' and type 'bool' in operation
Change-Id: I06d0950ce932ea635c422d3fb42ca80e6725dda1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Daniel Pesch [Wed, 22 Jan 2014 18:19:54 +0000 (19:19 +0100)]
Qmlplugindump error messages are not written consistently
For errors in command line parameters qmplugindump uses cerr
but errors during plugin loading are logged using qWarning().
It would be better to log always to cerr in case of problem
because some platforms (BB10) have logging from Qt redirected.
Task-number: QTBUG-36378
Change-Id: I04506c2f12b87190966e66c482f4ac5aed44af05
Signed-off-by: Daniel Pesch <dpesch@blackberry.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Friedemann Kleint [Thu, 23 Jan 2014 11:24:51 +0000 (12:24 +0100)]
Fix warning about unsafe flag operation in qqmltypecompiler.cpp.
compiler\qqmltypecompiler.cpp:1192: warning: C4806: '&' : unsafe operation: no value of type 'bool' promoted to type 'QQmlCustomParser::Flag' can equal the given constant
Change-Id: I2bc4add832a4382529d63de892e37c17f2670c4a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Ulf Hermann [Tue, 10 Dec 2013 11:02:40 +0000 (12:02 +0100)]
Rename V8 profiler classes to V4
Change-Id: I54a71b83bdcaa4198b63a08572bc3d9d1bf8deea
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Thiago Macieira [Wed, 22 Jan 2014 21:02:33 +0000 (13:02 -0800)]
Update changelog for 5.2.1
Change-Id: I6e8d2dbf129092c53331c639a767ca4955212f77
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Erik Verbruggen [Wed, 22 Jan 2014 12:02:09 +0000 (13:02 +0100)]
V4: remove more superfluous spills.
Spills for targets of phi-nodes are already inserted by the renumbering,
so they don't need to be added (again) while resolving edges.
This fixes a problem with crypto.js.
Change-Id: I4b1d79fc92236b4a6b0b6d6d30ada17c8581a093
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
J-P Nurmi [Tue, 21 Jan 2014 12:22:10 +0000 (14:22 +0200)]
QQuickText: fix layout mirroring
Task-number: QTBUG-35095
Change-Id: I8550821e01ecc931788c1ed73366ba1ceed7a817
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
Oswald Buddenhagen [Wed, 15 Jan 2014 21:01:15 +0000 (22:01 +0100)]
fix whitespace
remove trailing spaces and expand tabs
Change-Id: Ieacb9d096b612c45d1a64700044c114d1f7522bc
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Ulf Hermann [Thu, 16 Jan 2014 12:18:05 +0000 (13:18 +0100)]
Further pack messages for QQmlProfilerService
Allow multiple detailTypes in each packet and extend the profiling code
to make use of that. Note that this changes the usual order of
pixmapSizeKnown and PixmapLoadingFinished events. As far as I can see
this doesn't affect the QML profiler frontend and the order of these
events isn't specified anywhere.
Change-Id: Id39ad98594ccf35add4415e08daf9e92ab561237
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Ulf Hermann [Tue, 7 Jan 2014 09:29:45 +0000 (10:29 +0100)]
Put calls to QQmlVmeProfiler behind "if (enabled)" macros
The construction of arguments to those calls may be expensive and should
be avoided if we're not really profiling.
Task-number: QTBUG-35315
Change-Id: I558fa4cae6cf532d22193283f1ee2a3b680e2eee
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Gunnar Sletta [Wed, 22 Jan 2014 14:32:56 +0000 (15:32 +0100)]
Only look at alpha to decide if rectangle has fill or not.
Task-number: QTBUG-35606
Change-Id: Id403047e19e75d91ec3b3f8367166d8ec96ecaf8
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Gunnar Sletta [Wed, 22 Jan 2014 09:26:14 +0000 (10:26 +0100)]
Enforce texture cleanup to happen at the end of the sync phase.
This was ok for the threaded renderer, but for the single-threaded
renderers where the event loop was spinning we could run the risk
of scheduling a texture for deleteLater() and then cleaning it
up before we got around to the sync phase.
Task-number: QTBUG-35670
Change-Id: I92074294b427fd8ab2a1823ba79c7ac3b59094ec
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Ulf Hermann [Mon, 6 Jan 2014 12:48:23 +0000 (13:48 +0100)]
Put multiple QML profiling messages into one object where possible
As most of the QML profiling messages only use a small subset of the
available fields in QQmlProfilerData we can
a, reduce the size of QQmlProfilerData by using unions
b, put multiple messages into one object where their data doesn't
overlap
Furthermore we can add another field for saving QUrl members in
QQmlProfilerData so that we can combine more different messages
and don't have to convert from QUrl to QString while profiling. This
should reduce the impact of the profiling code on the performance
of the application being profiled.
Task-number: QTBUG-35315
Change-Id: Iecd61e90cc8490d2efbbb381391d98dfee61d3cd
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>