qt:qtdeclarative.git
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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

4 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

4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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

4 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>
4 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

4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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

4 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

4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 years agoRemove redundant button clicked handler in QQuickMessageBox
Berthold Krevert [Thu, 16 Jan 2014 18:13:16 +0000 (19:13 +0100)]
Remove redundant button clicked handler in QQuickMessageBox

Change c286b4fccb2d83fcc01b21913b95c5e4f21f2982 added the
QQuickAbstractMessageDialog::click() handler, which made the
QQuickMessageDialog::clicked() handler redundant.

Change-Id: Ifd770a3c67b35fd9a4929fc55b9e5298c36fb960
Task-number: QTBUG-35933
Reviewed-by: Liang Qi <liang.qi@digia.com>
4 years agoQQmlEngine - fix example in documentation
Kimmo Leppälä [Tue, 3 Sep 2013 06:59:34 +0000 (09:59 +0300)]
QQmlEngine - fix example in documentation

example_qjsvalue_singletontype_provider example code snippet
returns QJSValue instead of QJSValue*.

Change-Id: If4d5592fcee25ada9870602c8f92197980ef9b77
Reviewed-by: Nico Vertriest <nico.vertriest@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
4 years agoMerge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Frederik Gladhorn [Sat, 18 Jan 2014 11:26:50 +0000 (12:26 +0100)]
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev

4 years agoFix uninitialized variable in debug builds
Simon Hausmann [Fri, 17 Jan 2014 15:09:25 +0000 (16:09 +0100)]
Fix uninitialized variable in debug builds

Initialize size to zero in both constructors. This should fix UMRs.

Change-Id: I6888f667b3dc6b2e72e58b54288c3c88df3ced71
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
4 years agoNow android has only one platform plugin.
BogDan Vatra [Thu, 16 Jan 2014 10:06:58 +0000 (12:06 +0200)]
Now android has only one platform plugin.

Change-Id: Idd3e0ede63be101a757a4f5f531693e3c7a24af6
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
4 years agoMerge remote-tracking branch 'origin/stable' into dev
Frederik Gladhorn [Fri, 17 Jan 2014 14:22:12 +0000 (15:22 +0100)]
Merge remote-tracking branch 'origin/stable' into dev

Change-Id: Id265682aa7db9be1c0b305ab3207b2c932a25a9f

4 years agoWork around missing BGRA texture format on Samsung Galaxy Tab 3
Eskil Abrahamsen Blomfeldt [Mon, 13 Jan 2014 10:56:59 +0000 (11:56 +0100)]
Work around missing BGRA texture format on Samsung Galaxy Tab 3

The GL driver on the Galaxy Tab 3 reports support for the BGRA8888
texture format, but does not actually support it. For this particular
device we disable support for that format.

Task-number: QTBUG-34984
Change-Id: Ie26ef0e815c1622b3425c37237a3fc320543b92c
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
4 years agoV4: fix range splitting when split is between intervals.
Erik Verbruggen [Fri, 17 Jan 2014 10:45:37 +0000 (11:45 +0100)]
V4: fix range splitting when split is between intervals.

Also added some "white-box" unit tests and sprinkled in a bit of
documentation. The case that went wrong is covered by the test
rangeSplitting_1: before the fix, the new interval would have
two ranges: [66-64],[70-71]. The first range is invalid and should not
be there at all.

Change-Id: If0742f4e6a96d98ea5d696f95126886ba66f92bb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
4 years agoQQmlInstructionData: fix warning 'code' {is,might be} used uninit'ed
Marc Mutz [Wed, 4 Dec 2013 14:34:07 +0000 (15:34 +0100)]
QQmlInstructionData: fix warning 'code' {is,might be} used uninit'ed

This is a compile-error for -release -developer-build builds.

Change-Id: I7ea5363260ce35a013fbf6d1c538c763023a8dc0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
4 years agoImprove Mac OS X touch event enabling.
Morten Johan Sørvig [Wed, 8 Jan 2014 10:20:19 +0000 (11:20 +0100)]
Improve Mac OS X touch event enabling.

Previously, the Qt Quick touch interaction items would
enable touch events on window change. On app startup
this would typically happen before the platform window
was created, and the call to registerTouchWindow would
then create the platform window.

registerTouchWindow in QtBase has now been changed
to not create the platform window since this has
unwanted side effects. Calling it at window change
time will then have no effect for the initial window
change.

Enable and disable touch events on hoverEnter/Leave
instead. This is similar to what QtWidgets does and
has an additional benefit: touch events can now be
enabled when the mouse cursor is hovering over a touch
item, reducing the chances of it interfering with
scroll events for other items.

Task-number: QTBUG-32988
Change-Id: Ic48dbec910f52299d5068f5ca7508be73cdc6f36
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
4 years agoMake sure QQmlVmeProfiler methods can be inlined
Ulf Hermann [Thu, 2 Jan 2014 16:11:32 +0000 (17:11 +0100)]
Make sure QQmlVmeProfiler methods can be inlined

Move the definitions to the header and adapt the documentation.

Task-number: QTBUG-35315
Change-Id: I511a192cfe1e3e09ade035175cb8f3f332022143
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
4 years agoSwitch QML profiler off when deleting QQmlProfilerService
Ulf Hermann [Thu, 2 Jan 2014 14:55:41 +0000 (15:55 +0100)]
Switch QML profiler off when deleting QQmlProfilerService

Like this we don't have to check for QQmlProfilerService::instance
anymore in order to find out if we can use the profiler service. If
instance == 0 then enabled == false. Furthermore if it was thread safe
before it must still be thread safe like this.

Task-number: QTBUG-35315
Change-Id: Ie5737e3586f2431afbf11423ba53fd13dd371feb
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
4 years ago[new compiler] Add support for type and enum resolution for custom parsers
Simon Hausmann [Wed, 15 Jan 2014 15:17:22 +0000 (16:17 +0100)]
[new compiler] Add support for type and enum resolution for custom parsers

This is in preparation for listmodel support, share the code for resolving
types and enums between the old and the new compiler, as all it needs is the
imports.

Change-Id: I4908d71eee50c769108e0e2b68b03496722fa49d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
4 years ago[new compiler] Fix error reporting location for custom parsers
Simon Hausmann [Wed, 15 Jan 2014 12:32:42 +0000 (13:32 +0100)]
[new compiler] Fix error reporting location for custom parsers

After the binding of QQmlCompilePass to QQmlTypeCompiler, I forgot to
change the customer parser handling to also report the errors correctly
back to the QQmlTypeCompiler. Instead they were collected locally with an
empty url.

Change-Id: I5ee527a77e27c0339c507f326a3b0f0837353db3
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
4 years ago[new compiler] Fix implicit component definition for default properties
Simon Hausmann [Wed, 15 Jan 2014 11:57:01 +0000 (12:57 +0100)]
[new compiler] Fix implicit component definition for default properties

When trying to determine if an object binding should be a component or not
and we don't have a property name for the binding, then we must check if the
default property happens to be a QQmlComponent.

Change-Id: Ie21fc438b8b2d86caa3991794e6eac688c074440
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
4 years ago[new compiler] Add support for value interceptors / on-assignments
Simon Hausmann [Mon, 30 Sep 2013 15:39:49 +0000 (17:39 +0200)]
[new compiler] Add support for value interceptors / on-assignments

Behavior on x { NumberAnimation { ... } } is implemented by assigning a value
interceptor (Behavior is a sub-class of that) to the x property in a special
way. That requires various things:

* A VME meta-object must be created and installed on the surrounding object, in
  order for the interceptors to work
* On assignments need to be excluded from duplicate property assignment checks
* Behaviours require also finalization callbacks on component creation

Change-Id: I40250b71081a2e315cda3bdb6677fa4b227fa443
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
4 years ago[new compiler] Clean up property cache / meta object builder
Simon Hausmann [Mon, 13 Jan 2014 08:42:55 +0000 (09:42 +0100)]
[new compiler] Clean up property cache / meta object builder

Move the outter loop into the builder class itself, use a vector instead
of a list (we know that it's a fixed size and we only do indexed access)

Change-Id: I933f0496ea47b3bc7c2bebde7f1a14b4f603b4c3
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
4 years ago[new compiler] Initial support for QQuick state changes
Simon Hausmann [Fri, 10 Jan 2014 13:51:00 +0000 (14:51 +0100)]
[new compiler] Initial support for QQuick state changes

This requires the use of the customer parser together with lazy binding compilation

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