platform/upstream/qtdeclarative.git
10 years agoDisentangle some includes
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>
10 years agoMove Encode into qv4value_p.h
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>
10 years agoCleanups
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>
10 years agoGet rid of the SafeObject class
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>
10 years agoMove ArrayElementLessThen to qv4arraydata.cpp
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>
10 years agoRename some files
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>
10 years agoImplement Lookup::indexedSetter
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>
10 years agoFix a bug in qmljs_set_element and improve it's performance
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>
10 years agoBe stricter about the number of messages when testing profiler service
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>
10 years agoMake the QML debug server thread safe
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>
10 years agoMake QML import thread safe.
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>
10 years agoV4: remove unused field.
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>
10 years agoVisualization modes for rendering.
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>
10 years agoChange QQmlProfilerService::instance to be a getter
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>
10 years agoAllow debug plugin registrations from other threads than main GUI
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>
10 years agoProperly wait for stdout in test
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>
10 years agoAdd test for shaping and rendering Sinhala text
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>
10 years ago[new compiler] Avoid uncreatable type errors for types that aren't created
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>
10 years ago[new compiler] Fix timing of property assignment error handling
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>
10 years agoExpose TextEdit::linkAt(x, y)
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>
10 years agoExpose Text::linkAt(x, y)
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>
10 years agoSkip animations tests for MinGW.
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>
10 years agoUpdate TestExpectations
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>
10 years ago[new compiler] Report errors when trying to bind to read-only properties
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>
10 years ago[new compiler] Improved error handling
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>
10 years agoImproved error handling for namespaced property bindings
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>
10 years agoMove logic for determining native vs. DF text into single factory function
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>
10 years agoAllow renderType: Text.NativeRendering on retina displays/devices
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>
10 years agoMake sure a profiling range is started for every handled signal
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>
10 years agoAccessibility: add states to QQuickAccessibleAttached
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>
10 years ago[new compiler] Fix support for namespaces in attached properties
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>
10 years agoMerge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
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

10 years agoMerge remote-tracking branch 'origin/stable' into 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

10 years agoFix MSVC-warnings about double to float truncation in QML-tests.
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>
10 years agoFix MSVC-warning about unused variable in tst_qqmlapplicationengine.cpp
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>
10 years agoAllocate the ArrayData object and it's data together
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>
10 years agoChange virtual methods in ArrayData to take Object pointer
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>
10 years agoDont define CAN_BACKTRACE_EXECINFO when building on uClibc
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>
10 years ago[new compiler] Fix error message when trying to create uncreatable types
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>
10 years ago[new compiler] Fix crash in loading qtquick controls
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>
10 years agoFix build on WinRT
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>
10 years agoFix various compiler warnings in order to remove warn_off in the near future
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>
10 years agowince: Build fix, Windows can also run on ARM.
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>
10 years agowince: Build fix, assert() is not present in this platform.
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>
10 years agowince: Build fix, abort() is not available on this platform
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>
10 years agoUpdate our double conversion code to the latest release from code.google.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>
10 years agoDon't write into the callers stack frame
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>
10 years agoMerge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging...
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

10 years agoV4: fix life-time hole check.
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>
10 years agoMerge remote-tracking branch 'origin/release' into stable
Simon Hausmann [Fri, 24 Jan 2014 09:20:48 +0000 (10:20 +0100)]
Merge remote-tracking branch 'origin/release' into stable

Change-Id: I4b0f2d63aff78b50656a519c088afc4a076747f7

10 years agoTurn ArrayData into a Managed object
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>
10 years agoFix compile error with clang 3.4
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>
10 years agoFix warning about comparing double to boolean in js_equal().
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>
10 years agoQmlplugindump error messages are not written consistently
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>
10 years agoFix warning about unsafe flag operation in qqmltypecompiler.cpp.
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>
10 years agoRename V8 profiler classes to V4
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>
10 years agoUpdate changelog for 5.2.1
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>
10 years agoV4: remove more superfluous spills.
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>
10 years agoQQuickText: fix layout mirroring
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>
10 years agofix whitespace
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>
10 years agoFurther pack messages for QQmlProfilerService
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>
10 years agoPut calls to QQmlVmeProfiler behind "if (enabled)" macros
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>
10 years agoOnly look at alpha to decide if rectangle has fill or not.
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>
10 years agoEnforce texture cleanup to happen at the end of the sync phase.
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>
10 years agoPut multiple QML profiling messages into one object where possible
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>
10 years agoRevert QSGRenderNode to the old "in context" behavior
Gunnar Sletta [Tue, 21 Jan 2014 14:57:19 +0000 (15:57 +0100)]
Revert QSGRenderNode to the old "in context" behavior

There is already a lot of code out there that makes use
of the rendernode hook and some of it is not capable
of dealing with the render target being something other
than 0. (Mozilla in this case).

By forcing everything into the "alpha" code path, the
hit on the renderer should be fairly minimal as long as
render nodes are kept to a minimum, so reverting back
to the ugly old behavior is acceptable.

The API is still internal and highly discouraged.

Change-Id: Ie35484f52da6b0420257c95710fdda07a2be2c23
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoMerge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging...
Frederik Gladhorn [Wed, 22 Jan 2014 10:37:26 +0000 (11:37 +0100)]
Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable

10 years agoMerge remote-tracking branch 'origin/release' into stable
Frederik Gladhorn [Wed, 22 Jan 2014 10:36:29 +0000 (11:36 +0100)]
Merge remote-tracking branch 'origin/release' into stable

Change-Id: I2d9356cfb33f36f0b9167307b0c4fc6b71bb347a

10 years agoMake it possible to render without a depth buffer.
Gunnar Sletta [Tue, 21 Jan 2014 12:28:53 +0000 (13:28 +0100)]
Make it possible to render without a depth buffer.

Some GL implementations (especially on embedded) will give us an
OpenGL context without a depth buffer. In low memory scenarios, it
might also be feasible to request a non-depth buffer context to save
the depth buffer memory. The renderer deals with this by treating all
nodes as translucent, by not adjusting the shaders and by not creating
the extra z-order vertex attribute for merged nodes.

Change-Id: I8edc92d530daa3e2628df2ba52901b47d87eaf26
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoUnify calls to profiler service event methods.
Ulf Hermann [Thu, 2 Jan 2014 17:07:32 +0000 (18:07 +0100)]
Unify calls to profiler service event methods.

Don't needlessly duplicate information about the profiler being available
and allow inlining. Use macros to check availability of the profiler
in calling code and generally simplify the code.

Task-number: QTBUG-35315
Change-Id: I0a9daec4a95f74b9db795ef2918a01fb772ea107
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
10 years agoEnsure Flickable bounds detection is executed at the end of animation.
Martin Jones [Tue, 21 Jan 2014 06:12:48 +0000 (16:12 +1000)]
Ensure Flickable bounds detection is executed at the end of animation.

In pixelAligned mode the content position when animating is rounded to
a whole pixel, so the contentItem may reach the bound before the
animation completes.

Ensure bounds detection is run on animation completion.

Task-number: QTBUG-36300
Change-Id: I083ff6a03a5d1b9ca9e2201487b602f1588002be
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Joona Petrell <joona.petrell@jollamobile.com>
10 years agoSplit ManagedVTable into two classes
Lars Knoll [Mon, 20 Jan 2014 12:51:00 +0000 (13:51 +0100)]
Split ManagedVTable into two classes

Keep the basic methods in ManagedVTable, but have
the Object related stuff in an ObjectVTable class.

Change-Id: I9b068acf3caef813686227b8d935e7df1a7d1a6e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoParse source location for signal handling functions
Ulf Hermann [Mon, 16 Dec 2013 14:30:22 +0000 (15:30 +0100)]
Parse source location for signal handling functions

Previously the source location of signal handlers was always line 0 and
column 0. This poses problems when trying to extract meaningful
profiling information. The change assigns the source location of the
statement declaring the function as the function's source location.

Task-number: QTCREATORBUG-11100
Change-Id: I4bb8682b35147a7cfe4ecec342d4a00623bb1e0d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoRetrieve detailed location information when profiling signal handlers
Ulf Hermann [Mon, 16 Dec 2013 15:19:56 +0000 (16:19 +0100)]
Retrieve detailed location information when profiling signal handlers

Use the Functions associated with signal handlers to find out
which exact code is being executed.

Task-number: QTCREATORBUG-11100
Change-Id: Idfae9d188b17977b55f551e6fe766042fe24e786
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoMake compile on DragonFly BSD.
Alex Blasche [Tue, 21 Jan 2014 09:55:18 +0000 (10:55 +0100)]
Make compile on DragonFly BSD.

[ChangeLog][Platform Specific Changes][BSD] Fixed compile errors on
DragonFly BSD and potentially FreeBSD.

Task-number: QTBUG-35867
Change-Id: Iea90b93672c34f8a4b56e9afc4dbfb82cc993548
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoAdd missing test data files to .pro
Ulf Hermann [Mon, 20 Jan 2014 09:25:33 +0000 (10:25 +0100)]
Add missing test data files to .pro

Change-Id: I7e53877de266c1c11509bbd7c4c558be837df462
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoqmplugindump is not able to dump all registered components
Daniel Pesch [Mon, 20 Jan 2014 17:37:32 +0000 (18:37 +0100)]
qmplugindump is not able to dump all registered components

This patch implements a new function QQmlMetaType::qmlAllTypes() used
by qmlplugindump that returns list of all registered components. Previous
implementation used QQmlMetaType::qmlATypes() call that returned only
components with defined QML name.

Task-number: QTBUG-36199
Change-Id: I85acba61cfa511973a004934cf0650f38cc46ed9
Signed-off-by: Daniel Pesch <dpesch@blackberry.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
10 years agoAdjust method naming to be closer to Managed
Lars Knoll [Mon, 20 Jan 2014 11:15:26 +0000 (12:15 +0100)]
Adjust method naming to be closer to Managed

Also make markObjects() virtual, to be in line with
Managed.

Change-Id: I3e7682216660e2027c02c9181e541b12310902f3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoReorder members in ManagedVTable
Lars Knoll [Mon, 20 Jan 2014 10:43:25 +0000 (11:43 +0100)]
Reorder members in ManagedVTable

This is to prepare splitting it up into a
several type dependent vtables.

Change-Id: I5de8234e40ffc73fab47d43f4a1b30d244fc6ad9
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoUse lookups for indexed accesses
Lars Knoll [Fri, 17 Jan 2014 11:19:34 +0000 (12:19 +0100)]
Use lookups for indexed accesses

This speeds up reading array data from objects significantly.

Change-Id: I5d17a7b3e7583a16dc76d1ee6cbc1d7134e4c2fa
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoAdd a SimpleArrayData class
Lars Knoll [Mon, 13 Jan 2014 08:09:14 +0000 (09:09 +0100)]
Add a SimpleArrayData class

This makes the ArrayData class 'pure virtual'. SimpleArrayData
now contains the implementation of simple arrays. This makes the
separation between simple and sparse arrays a lot cleaner.

It also allows us to move len and offset from the base class into
the SimpleArrayClass. This fixes some bugs where we accessed len
for sparse arrays leading to some buggy behavior.

Added a virtual length() method to ArrayData to query the highes
used index in the Array.

Change-Id: Iab2ba2a48ebe5b7031759eeb4ebe02b4d86233f0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoSave memory on array data
Lars Knoll [Thu, 9 Jan 2014 10:05:08 +0000 (11:05 +0100)]
Save memory on array data

Store a simple vector of Values in the array data,
instead of a Vector of Property's. This halfes the
memory consumption on 64bit and simplifies our code.

If an indexed property gets converted to an accessor
property, we simply convert the ArrayData into a
SparseArrayData.

Add support in SparseArrayData to allocate double slots
(two Value's) to hold a full Property in case someone
sets an accessor on an indexed property.

Some methods still return a Property*, but this is safe, as
only the first Value in the Property pointer will ever get
accessed if the Property doesn't contain an accessor.

Change-Id: Ic9b0f309b09a2772a328d947a10faaf3be9fe56f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoChanges to the structure of Property
Lars Knoll [Wed, 8 Jan 2014 14:59:34 +0000 (15:59 +0100)]
Changes to the structure of Property

Put the getter into the regular value, and the setter into
the next value following. Like this we can compress property
data to only use 8 bytes per property for regular properties
and simply allocate two slots for accessor properties.

Change-Id: I330b95dbd583ebc2658fed79d37ac3b53492c0cd
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoFixes to sparse array handling
Lars Knoll [Thu, 9 Jan 2014 15:48:56 +0000 (16:48 +0100)]
Fixes to sparse array handling

deleting entries in sparse arrays could lead
to rather unexpected results where values got
moved to wrong indices, as we didn't correctly
update the size_left values in the red-black tree.

Change-Id: If71fcc04d39f257194394cb4f734d0db14b92b69
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoSmall bug fix
Lars Knoll [Wed, 8 Jan 2014 14:13:30 +0000 (15:13 +0100)]
Small bug fix

Change-Id: I5c670d898cd7a049de6f8a78d966df1c6fbde2c5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoFix a small bug in queryIndexed() for StringObjects
Lars Knoll [Wed, 8 Jan 2014 13:57:07 +0000 (14:57 +0100)]
Fix a small bug in queryIndexed() for StringObjects

The string is immutable, thus queries indexing into the
string data need to return Attr_NotWritable|Attr_NotConfigurable
(see 15.5.5.2 of the ecma spec).

Change-Id: I180d983b04a209c29fcd37b11682999b57bc42fe
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoDon't return a Property pointer in Object::advanceIterator
Lars Knoll [Wed, 8 Jan 2014 13:51:33 +0000 (14:51 +0100)]
Don't return a Property pointer in Object::advanceIterator

Change-Id: Iac4cb2a2252b18e40455910e51e3e374df7c1e80
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoRemove Property * return value from ObjectIterator
Lars Knoll [Wed, 8 Jan 2014 12:08:41 +0000 (13:08 +0100)]
Remove Property * return value from ObjectIterator

The added side effect is that the QJSValueIterator is now
somewhat faster.

Change-Id: I01ba9f2a72a34224f5691130df69a91ab75b72e6
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoclean up Object::has(Own)Property
Lars Knoll [Wed, 8 Jan 2014 11:46:53 +0000 (12:46 +0100)]
clean up Object::has(Own)Property

hasProperty is now implemented by calling hasOwnProperty
on the proto chain. In addition, it should be slightly
faster and doesn't use API that returns a Property pointer
anymore.

Change-Id: I6312d83ccfed3f0a1a8ec4c72c436a426d6eab44
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoLookup::lookup should not return a Property pointer
Lars Knoll [Tue, 7 Jan 2014 15:47:44 +0000 (16:47 +0100)]
Lookup::lookup should not return a Property pointer

Change-Id: I5c9858f636c199b9cbe7cb2bffa03db14b6e1ae4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years ago[new compiler] Correct the use of default property
Simon Hausmann [Sun, 19 Jan 2014 13:22:54 +0000 (14:22 +0100)]
[new compiler] Correct the use of default property

When a type declares a new default property, then the old default property
continues to apply to its own bindings.

Change-Id: Iafeec772baa4e1a430b09eed0b348b83984246cd
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoqmlplugindump: New component properties isCreatable and isSingleton
Daniel Pesch [Mon, 20 Jan 2014 15:40:30 +0000 (16:40 +0100)]
qmlplugindump: New component properties isCreatable and isSingleton

Qmlplugindump tool does not generate information about singleton status
and creatability from QML for a component. This patch adds two new boolean
properties that contain this information. It is used by Momentics IDE for
providing better code validation and could be used by QtCreator in future
in similar way.

Task-number: QTBUG-36139
Change-Id: If85374a1854aaa0727670b27df735d481cab5337
Signed-off-by: Daniel Pesch <dpesch@blackberry.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
10 years agoAdd support for deprecated RegExp (constructor) properties
Simon Hausmann [Mon, 20 Jan 2014 13:32:26 +0000 (14:32 +0100)]
Add support for deprecated RegExp (constructor) properties

These were apparently part of ancient EcmaScript specs, aren't even listed
anymore in any recent spec (not even as deprecated), but apparently they
are part of what the web supports as well as previous versions of Qml. So
this patch implements them.

Task-number: QTBUG-36244

Change-Id: I1b9ea7ea09fceb6a486f615837a71e41aae12de4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years ago[new compiler] Fix implicit component determination for composite types
Simon Hausmann [Fri, 17 Jan 2014 15:40:30 +0000 (16:40 +0100)]
[new compiler] Fix implicit component determination for composite types

We want to search every object for properties that implicitly define
components, unless the object itself is a Component. That means if there's a
QQmlType and that meta-object is QQmlComponent's or there's no QQmlType because
it's a composite type.

Fixes QtQuickControls parsing.

Change-Id: I3fc7c2aff0c83ceada0c6772a02eff40a22777c9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years ago[new compiler] Fix duplicate property/signal name detection for group objects
Simon Hausmann [Fri, 17 Jan 2014 14:56:14 +0000 (15:56 +0100)]
[new compiler] Fix duplicate property/signal name detection for group objects

For a rectangle like this:

    color: "blue"
    border.color: "red"

we must not issue a duplicate property error for "color" because they
are in different objects. This patch fixes that by moving the sets for
checking the presence of these into the object itself, so that the qSwap
on _object also transitions to the correct property/signal name set.

Change-Id: I9ac0e5877eb9f60b618b031f99290707de28112d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years ago[new compiler] Add support for QML list models
Simon Hausmann [Wed, 15 Jan 2014 16:29:04 +0000 (17:29 +0100)]
[new compiler] Add support for QML list models

List model definitions make heavy use of custom parsers, which requires AST
access as well as a general port to the new QQmlCustomParser API.

Additional fixes in the custom parser support were needed to pass all tests:

 * Fix support for AcceptsSignalHandlers and AcceptsAttachedProperties
 * Don't call setCustomData unless the compiler generated data earlier

Change-Id: Ic42f8a890391267c94f63d35f055b60fdbf3c83d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years ago[new compiler] Fix type versioning
Simon Hausmann [Fri, 17 Jan 2014 11:53:14 +0000 (12:53 +0100)]
[new compiler] Fix type versioning

Imported types with a meta object that contains revisioned attributes, need
their property cache created for exactly the imported version. So this is done
ahead of type and populated in the resolved types, similar to the old code path
in qqmlcompiler.cpp.

Change-Id: I65a5d140d8f49cceeeee1162ab2d6376ad9c2e42
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years ago[new compiler] Fix refcounting leaks with property caches
Simon Hausmann [Fri, 17 Jan 2014 11:16:07 +0000 (12:16 +0100)]
[new compiler] Fix refcounting leaks with property caches

The TypeReference is not copy-safe, as it holds refcounted property cache
pointers. For the new compiler code path, don't copy them but keep pointers to
TypeReference objects around.  Also make sure to ref the root property cache
correctly and avoid the unnecessary addref for the property cache when creating
new vme meta objects (initial refcount is 1).

Change-Id: I0c4b952c8300c2167d926d9c35b8579fd505d596
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years ago[new compiler] Fix customer parser use with nested objects
Simon Hausmann [Thu, 16 Jan 2014 13:51:33 +0000 (14:51 +0100)]
[new compiler] Fix customer parser use with nested objects

Types with a custom parser attached don't need to continue with validation of
properties in sub-objects.

Change-Id: Ib25f8e037cf651dfb30dd4016f89980612dff4f4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years ago[new compiler] Fix id mapping in implicitly defined components
Simon Hausmann [Thu, 16 Jan 2014 16:29:40 +0000 (17:29 +0100)]
[new compiler] Fix id mapping in implicitly defined components

When scanning for component roots of explicitly defined components, make sure
to skip synthetized ones. Now samegame runs :)

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