profile/ivi/qtdeclarative.git
12 years agoRemoved ### from scenegraph
Gunnar Sletta [Wed, 16 May 2012 12:41:30 +0000 (14:41 +0200)]
Removed ### from scenegraph

Change-Id: I6b114938d2c52df95469975ffa87449f7fd8c647
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
12 years agoAccessibility: Do not look for the "text" property as a last resort.
Jan-Arve Saether [Tue, 15 May 2012 13:01:23 +0000 (15:01 +0200)]
Accessibility: Do not look for the "text" property as a last resort.

This does not work very well with items where the text property
is just an alias to the concrete property on a child item.
The screen reader might then read aloud the text twice, one for the
item with the alias, and another time for the child item.

Change-Id: I11764c2988b1b3b10b6d80ed8978ef2191d51097
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
12 years agoLocal Storage: Moving local storage documentation from doc to src
Jerome Pasion [Wed, 16 May 2012 13:24:34 +0000 (15:24 +0200)]
Local Storage: Moving local storage documentation from doc to src

-A submodule of QtQuick, moving to src/quick/doc/src/localstorage

Change-Id: I394ceacac695e17b656339445c22450cea973e95
Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
12 years agoDocument the dangers of executing the event loop in QML API
Martin Jones [Wed, 16 May 2012 00:34:19 +0000 (10:34 +1000)]
Document the dangers of executing the event loop in QML API

Change-Id: I0294dd85fcc60615240a33c6e4a108fbde17a4bc
Reviewed-by: Bea Lam <bea.lam@nokia.com>
12 years agoFix documentation for QSGGeometry::allocate()
Glenn Watson [Wed, 9 May 2012 01:31:45 +0000 (11:31 +1000)]
Fix documentation for QSGGeometry::allocate()

Make clear in the documentation that client code must dirty the
geometry node that contains the geometry class, to allow the
renderer implementation to update internal buffers.

Change-Id: I5cfddee1d0969410d7b3175c381679bd9083cc2b
Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
12 years agoEnsure that we don't attempt to dispose handle twice
Chris Adams [Tue, 15 May 2012 02:15:35 +0000 (12:15 +1000)]
Ensure that we don't attempt to dispose handle twice

If a weak ref callback causes disposal of a v8object associated with
a qobject, the later qqmldata::destroyed() handler could cause a
double dispose, due to 753d9f4be5960be8b11ad067b29fc87c168ee663.

Change-Id: I07c1c8e2e7b444a7e873da26bc4d0c19bcfe57b5
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
12 years agoFix composite type property support
Chris Adams [Wed, 9 May 2012 02:21:41 +0000 (12:21 +1000)]
Fix composite type property support

The metatype changes caused a regression in composite type properties
for which there was no autotest.  In particular, declarative previously
used the transitional QMetaType::registerType() function, whose
implementation specifies a zero-size, which means that accessing a
property of that type via QObject::property would fail.

This commit adds some unit tests to track the issue, and also fixes the
implementation of QQmlEnginePrivate::registerCompositeType to use the
updated metatype registration functions.

Task-number: QTBUG-25697
Change-Id: Ic4abc1711aee8cf4a50a2ef1769465ef73f5d022
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
12 years agoDocument inconsistency with JS-to-Qt date/time conversion
Matthew Vogt [Mon, 14 May 2012 23:41:34 +0000 (09:41 +1000)]
Document inconsistency with JS-to-Qt date/time conversion

The Qt locale object can yield an incorrect date/time string when
there is a variation in interpretation of historical DST
applicability.

Change-Id: Ie1e66f0ed838da4972359634bd3ea1ebd692cc3d
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoEnable memory profiler symbol lookup.
Glenn Watson [Tue, 15 May 2012 22:14:13 +0000 (08:14 +1000)]
Enable memory profiler symbol lookup.

Enable the profiler initialization, now that the required
API is available in qtbase.

Change-Id: I620eade732cfe2de88360515350a7f95676fca04
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoMore efficient property interceptor implementation
Aaron Kennedy [Mon, 14 May 2012 10:12:00 +0000 (11:12 +0100)]
More efficient property interceptor implementation

The initial implementation vastly overestimated the number of interceptors
that would exist.

Change-Id: Ieddc55306e5976a9373a2b468013936240228992
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoQml module is not dependent on gui module
Tapani Mikola [Tue, 15 May 2012 10:44:37 +0000 (13:44 +0300)]
Qml module is not dependent on gui module

Change-Id: If69f6b064b92d2e188f41d7bb9f909f61f35c717
Reviewed-by: Tapani Mikola <tapani.mikola@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoOptimize cross-thread calls into the shared graphics cache
Eskil Abrahamsen Blomfeldt [Tue, 15 May 2012 12:37:37 +0000 (14:37 +0200)]
Optimize cross-thread calls into the shared graphics cache

QMetaObject::invokeMethod() is quite slow compared to just
posting events, since we don't really require deep copies of
the input data as long as it's read-only.

Change-Id: Ib5c0a14e1aac3120871a9bcf4aee8804e7d8b287
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoRemove usage of deprecated plugin loader functionality.
Friedemann Kleint [Mon, 14 May 2012 10:36:03 +0000 (12:36 +0200)]
Remove usage of deprecated plugin loader functionality.

Use QFactoryLoader::instance(int) instead if deprecated
QFactoryLoader::instance(key).

Change-Id: I61d087e7e03d472f69427e53f5f194856eb5bffe
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoRevert "Allow function assignment to cause binding for non-var props"
Chris Adams [Mon, 14 May 2012 03:29:47 +0000 (13:29 +1000)]
Revert "Allow function assignment to cause binding for non-var props"

This reverts commit 92b1f9981d225ecee28da1f0a88fb3046000cb5e.

Conflicts:

src/qml/qml/v8/qv8qobjectwrapper.cpp

Also remove XPASS tests from qjsonbinding

Change-Id: Ibc9da28d5f0bdffbf62e7e20f12bb55ff36ae271
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoAdd hooks for declarative memory profiler.
Glenn Watson [Tue, 15 May 2012 01:57:51 +0000 (11:57 +1000)]
Add hooks for declarative memory profiler.

These macros effectively do nothing if the profiling library has not
been preloaded. However, if the library is loaded they provide some
additional context for each heap allocation, by tagging each
subsequent allocation with the QML file that caused the allocation
to occur.

Change-Id: Ib1f56d0df0664e118e04e53e22a6942317b1baed
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agodoc: Remove references to QScript*
Girish Ramakrishnan [Fri, 11 May 2012 16:01:43 +0000 (09:01 -0700)]
doc: Remove references to QScript*

The second document snippet won't work anymore since the equivalent
of QScriptValue::PropertyFlag doesn't exist. It is thus removed.

Change-Id: Ib8fadef6c6aec4bc257cc245bb58948f64b69945
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoDon't pass the expression string to the signal handler profiler.
Michael Brasser [Mon, 14 May 2012 01:56:36 +0000 (11:56 +1000)]
Don't pass the expression string to the signal handler profiler.

Working towards removing the need to store a copy of the expression
string in the expression.

Author: Christiaan Janssen <christiaan.janssen@nokia.com>
Change-Id: I2cedfcf455c9aa4f1fb2ed422533945371038c58
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoInspector:Modified Apply changes on Save for unsync. changes
Simjees Abraham [Fri, 11 May 2012 12:37:33 +0000 (14:37 +0200)]
Inspector:Modified Apply changes on Save for unsync. changes

Changes done to reload the view if the user opts to do so after making
unsynchronizable changes. Inspector informs the QmlEngine about the
changes which caches it. The cache is used to load the files which
were changed when reloading the view.

Change-Id: I22d476cace294d6ecf4e428dac104a557c3f7dde
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years agoQtQuick: Fix string related warnings, single character strings.
Friedemann Kleint [Mon, 14 May 2012 11:50:46 +0000 (13:50 +0200)]
QtQuick: Fix string related warnings, single character strings.

- Fix warnings about truncation from size_t to int (MSVC 2010,
  64bit).
- Remove single character strings.

Change-Id: Iaf4406e4e04d55d2d8b762f3433269868842a6f9
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
12 years agoExplicitly enable exceptions for QtQml
Lars Knoll [Wed, 9 May 2012 19:38:12 +0000 (21:38 +0200)]
Explicitly enable exceptions for QtQml

QtQml uses a try/catch statement in one place to
safeguard QList resizing. Since this can be called
from the JS side, it needs to be safeguarded.

Long term we should find a different way of handling this
then using exceptions in one place.

Change-Id: I51864d1b7ab468dd190c48e7a47c852ce35d40f1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRemove QtDeclarative compatibility module
Kent Hansen [Thu, 10 May 2012 13:41:29 +0000 (15:41 +0200)]
Remove QtDeclarative compatibility module

When the QtDeclarative module was renamed to QtQml, a compatibility
module was introduced to avoid disrupting downstream projects.
Time has passed, and it's now appropriate to remove this module.

Existing projects that haven't ported can still use the
bin/rename-qtdeclarative-symbols.sh script to ease the porting.

Change-Id: I05a9727013d9e38c2262577f68260a4382bfbeea
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Donald Carr <donald.carr@nokia.com>
12 years agoFix invalid qdoc input
Alan Alpert [Mon, 14 May 2012 06:04:11 +0000 (16:04 +1000)]
Fix invalid qdoc input

Change-Id: I0f6143d7b8f816f0d55281c7ba0eec8248ce1cbe
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoRemoved CONFIG+=parallel_test from parallel-unsafe tests
Rohan McGovern [Mon, 14 May 2012 03:28:21 +0000 (13:28 +1000)]
Removed CONFIG+=parallel_test from parallel-unsafe tests

These tests are marked with CONFIG+=parallel_test, but are observed to
fail sometimes if run concurrently with other tests, and pass otherwise.

Change-Id: Id59209ca80c7449bdc0689af522c82ff00c4b588
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoCalculate vertex positions on CPU
Alan Alpert [Fri, 11 May 2012 10:38:26 +0000 (20:38 +1000)]
Calculate vertex positions on CPU

Easier for SG to optimize with, not really gaining anything putting it
on the GPU for these Elements.

Change-Id: I239e70dafce441f5281ded185de63bc1afd7d85a
Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
12 years agoPathView was moving view too soon on drag
Martin Jones [Mon, 14 May 2012 02:49:52 +0000 (12:49 +1000)]
PathView was moving view too soon on drag

In order to allow gesture grabbing to work correctly, the view shouldn't
react to a drag until the event after the one that triggered it.

Change-Id: I3b84e501aa0f82da821498fa26abe8bbf66a6252
Reviewed-by: Bea Lam <bea.lam@nokia.com>
12 years agoPrint sprite errors only once
Alan Alpert [Tue, 1 May 2012 06:19:06 +0000 (16:19 +1000)]
Print sprite errors only once

Change-Id: I1dfb829d47cfdb5c5af3f3bc5956483ea6ef6314
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoFlesh out the sprite documentation
Alan Alpert [Fri, 11 May 2012 09:38:49 +0000 (19:38 +1000)]
Flesh out the sprite documentation

Task-number: QTBUG-24770

Change-Id: I40c46aa29ffdcc5899bece46c4b6227ca29695cd
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoAvoid accessing sprites until they finish loading
Alan Alpert [Tue, 1 May 2012 06:08:54 +0000 (16:08 +1000)]
Avoid accessing sprites until they finish loading

Because sprite properties are not valid until image assembly finishes,
some features of the sprite engine cannot work until sprite assembly is
finished. In these circumstances, we shouldn't crash.

Task-number: QTBUG-24797
Change-Id: I2701f9302620c2cfd5b7bc5ce1cb9f31be4d4e19
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
12 years agoReload image on source changed
Alan Alpert [Thu, 10 May 2012 09:53:42 +0000 (19:53 +1000)]
Reload image on source changed

Task-number: QTBUG-25041

Change-Id: Icc02aead76d8b764c9955ac5914e9e026c00461e
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoEnd the deprecation period of SpriteImage
Alan Alpert [Tue, 1 May 2012 07:25:38 +0000 (17:25 +1000)]
End the deprecation period of SpriteImage

Also remove the stale files left around.

Change-Id: I2f275f23ebfb65045cc683ccd542cbc451b767fb
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoFix setting drag properties in mousePress.
Andrew den Exter [Fri, 11 May 2012 01:01:33 +0000 (11:01 +1000)]
Fix setting drag properties in mousePress.

Cache the dragX and dragY properties after the onPressed
signal has been emitted to allow for deferred creation of the drag
object or changes to the axis property in the handler.

Change-Id: If154e661359c82e957fcf0cbc11ccc1f75bee919
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoHandle Var instructions in instruction dumper
Kent Hansen [Thu, 10 May 2012 07:26:35 +0000 (09:26 +0200)]
Handle Var instructions in instruction dumper

They would show up as "XXX UNKNOWN INSTRUCTION" in instruction dumps.

Change-Id: I3bebfe7519ddfb75c413a067ef05867cc07cd71b
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
12 years agoText benchmarks
Yann Bodson [Tue, 8 May 2012 01:05:21 +0000 (11:05 +1000)]
Text benchmarks

Benchmarks to compare the cost of creating 42 text items in a grid
vs. using a single text item with 42 lines and laying them out
using onLineLaidOut.

Change-Id: I4c11e23a3fd04bb8b52b5566fb120d336614c98b
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoAnimatedSprite system tests
Damian Jansen [Tue, 3 Apr 2012 04:21:23 +0000 (14:21 +1000)]
AnimatedSprite system tests

Basic sprite tests to validate frame rate and source changes

Change-Id: I0279e89c55a4b5da5a0ee00a40c53ede1e27390a
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
12 years agoAdd more benchmark tests for Item
Adriano Rezende [Fri, 11 May 2012 10:48:06 +0000 (12:48 +0200)]
Add more benchmark tests for Item

Change-Id: I603df39d75a5eddb02a39ab08755991a0655ff19
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoFix xOrigin and yOrigin to always be top-left pos
Bea Lam [Thu, 10 May 2012 05:15:50 +0000 (15:15 +1000)]
Fix xOrigin and yOrigin to always be top-left pos

Currently xOrigin is reversed for right-to-left and yOrigin is reversed
for bottom-to-top. This is wrong since xOrigin and yOrigin come from
Flickable so they should keep that meaning, i.e. the top left corner of
where the content begins, in ListView and GridView.

Change-Id: I88c77fadd1cf784f4b4d62677168b84675e921b0
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoDefer construction of TextEdit/TextInput delegates.
Andrew den Exter [Fri, 4 May 2012 06:07:32 +0000 (16:07 +1000)]
Defer construction of TextEdit/TextInput delegates.

Don't create instances of the delegate components until the item
gains focus, or the cursorVisible property is set to true.

Cursor delegates are typically small and relatively fast to create and
so won't have a significant cost during a one off focus in event,
but that cost can still add up when creating a number of TextInputs
or TextEdits at once.  If a delegate that is instantiated immeditately
is required it is possible to instead create a child item and bind to
the cursorRectangle and cursorVisible properties.

Change-Id: I5ec2b5b6a30e534aee3dd5a58c6a5ac0686f5ce2
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoQQmlDebugService: Fetch Objects for location info
Aurindam Jana [Thu, 10 May 2012 07:21:26 +0000 (09:21 +0200)]
QQmlDebugService: Fetch Objects for location info

Fetch Objects for given filename, line number and column
number.

Change-Id: I9a81e4c7fa75faaf87f02453026c5320b7f86003
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
12 years agoFix case where visible wasn't marked as dirty.
Alan Alpert [Thu, 10 May 2012 10:48:59 +0000 (20:48 +1000)]
Fix case where visible wasn't marked as dirty.

In the case where an item was marked invisible when it was already
effectively invisible, we previously did not update the dirty visibility
and so it would still get drawn when it became effectively visible.

Task-number: QTBUG-24847
Change-Id: Id1ee815e8184e4fc632214a7c8eea0a613fcc376
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoDispose the v8object handle in QQmlData::destroy()
Chris Adams [Fri, 11 May 2012 01:28:24 +0000 (11:28 +1000)]
Dispose the v8object handle in QQmlData::destroy()

Previously, the handle was simply cleared, which meant that the data
referenced by the handle would only be destroyed during the next
garbage collection cycle.  That had the unwanted side effect that
v8's gc heuristics would assume that the old pointer space needed
expansion more regularly than is required in truth, which has the
further effect of slowing down mark-sweep-compact cycles considerably.

Change-Id: I41595a4d79a75866f434c371139e5493e757d6ab
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years agoPermit signals to be emitted in a different thread
Aaron Kennedy [Fri, 11 May 2012 13:13:47 +0000 (14:13 +0100)]
Permit signals to be emitted in a different thread

The QQmlNotifier approach to connecting to signals did not
support the cross-thread signal/slot model used elsewhere in
Qt.  This change allows one specific case of that - emitting
a signal in a different thread than the one the QObject
lives - to work.

Task-number: QTBUG-25647
Change-Id: Ia8fdaf4c7d7e2ccd7ff7657bb1d8e26277eb60aa
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years agoAllow image providers to force their loading to be asynchronous
Tor Arne Vestbø [Tue, 8 May 2012 08:28:24 +0000 (10:28 +0200)]
Allow image providers to force their loading to be asynchronous

The request methods of an image provider are assumed to be synchronous,
but sometimes the provider will be implemented in an async manner, eg.
through network request or doing the I/O on a different thread. In that
case, the provider can't expose this async behavior to clients, but needs
to block in the request method. This is less then ideal for clients,
since the default behvior of an image element is to load synchronously,
so we introduce a new flag to image providers that let's the provider
force the loading to happen on the async image loading thread.

Similar to network requests (which are always async), this does not
affect the 'asynchronous' property of the image element.

Change-Id: I9542abbcc594b9aab565210bc3005a95592c1e9c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Reviewed-by: Michalina Ziemba <michalina.ziemba@nokia.com>
12 years agoImprove variable name
Frederik Gladhorn [Thu, 10 May 2012 17:48:17 +0000 (19:48 +0200)]
Improve variable name

Change-Id: I3dfc7f156c08c3aff43ebf7e288da15d9459c49e
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
12 years agoFix axis locking for AutoFlickDirection
Andras Becsi [Thu, 10 May 2012 13:12:18 +0000 (15:12 +0200)]
Fix axis locking for AutoFlickDirection

If the flickableDirection property is AutoFlickDirection Flickable
compares qreals for equality to decide whether to lock flicking in one
direction. This is too restrictive since the content size could have
rounding errors withing the one pixel range resulting from pixel
alignment and float calculations.

Flickable should consider the content width/height equal to its
width/height if their difference is within the one pixel range.

Change-Id: Id3bff33d6f798860c62c699a6c2795213efe233d
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoDon't use QtDeclarative compat module
Kent Hansen [Thu, 10 May 2012 13:39:03 +0000 (15:39 +0200)]
Don't use QtDeclarative compat module

Use QtQml instead.

Change-Id: If899ebc1e0b4ea86f0f8d4369fbd3eb5cbb2181c
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
12 years agoMake unaligned centered alignment optional.
Martin Jones [Wed, 9 May 2012 01:25:31 +0000 (11:25 +1000)]
Make unaligned centered alignment optional.

Centered alignment was recently made unaligned by
e99c5a3f113bbc1b8f8db996b4b0d5715eea2d89.  This has the side-effect
of sometimes making items appear fuzzy due to sub-pixel alignment.
Since we have two conflicting goals, make this behavior configuarable.

Change-Id: I5ed0e9532a64f4a986d148044f5871a7ec970f5f
Reviewed-by: Bea Lam <bea.lam@nokia.com>
12 years agoAnimatedSprite framespeed properties now restart animation.
Alan Alpert [Wed, 9 May 2012 07:01:37 +0000 (17:01 +1000)]
AnimatedSprite framespeed properties now restart animation.

For a simple element, we're taking the simple solution for the
interaction of changing these parameters during an animation.

Task-number: QTBUG-25045
Task-number: QTBUG-25043
Change-Id: I1fb37fc029f23ce92558cb2e5deed80a69784173
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoKeep m_states and m_sprites synchronized
Alan Alpert [Tue, 1 May 2012 05:17:16 +0000 (15:17 +1000)]
Keep m_states and m_sprites synchronized

Previously you could have more states than sprites, which could lead to
errors because the sprite engine assumes bounds checking was done by the
state engine (which only knows the size of the states list).

Change-Id: Ie6069caa96d01cc28cc79350e6db5ff4191831a8
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoDebug mode for SpriteEngine
Alan Alpert [Thu, 22 Mar 2012 07:48:58 +0000 (17:48 +1000)]
Debug mode for SpriteEngine

Outputs the assembled sheet, for manual verification. Compile in by
uncommenting the ifdef.

Change-Id: Ia21d008cf1fd5ff0a551409f75683599cbb465a1
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoDoc: Fix \sa usage
Marius Storm-Olsen [Thu, 10 May 2012 11:20:35 +0000 (13:20 +0200)]
Doc: Fix \sa usage

Ensure comma between elements (16 missing), single space and curly-
braces around title elements, etc.

Change-Id: I74e5a42e4a7054265c5c8445f8d2e2e6f46d0cf9
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoMake sure there is a proper update when exposing with trivial
Laszlo Agocs [Thu, 10 May 2012 08:30:41 +0000 (11:30 +0300)]
Make sure there is a proper update when exposing with trivial

We need to have updatePending set otherwise there will be no
swapBuffers() which looks quite bad when minimizing and restoring a
window on xcb for instance. (we end up with having no window content
shown until there is a proper update triggered for whatever reason)

Change-Id: Ia58bbe92dbb7fb7e184828dc9ffbf0ddce0131e1
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoAvoid overzealous image clearing.
Alan Alpert [Tue, 1 May 2012 05:26:45 +0000 (15:26 +1000)]
Avoid overzealous image clearing.

Task-number: QTBUG-25527

Change-Id: I4b8e1b16c869feb419212e117f3fec865fb546e3
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoDo not send double click when neither mouse nor touch was accepted
Laszlo Agocs [Wed, 9 May 2012 06:44:59 +0000 (09:44 +0300)]
Do not send double click when neither mouse nor touch was accepted

The original fix in change Ief4de360203e55e56f83179075e050f717a12108
worked fine for mouse-based components. However when mixing with
components that handle touch too, the event->isAccepted() condition
gets problematic: It might be true because the touch was accepted, it
does not guarantee the mouse press was accepted.

Change-Id: I00bfff2bd700da84f8cc12cf36430ed381ea320b
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoAllow V4 bindings to be assigned to aliases
Michael Brasser [Wed, 2 May 2012 01:47:55 +0000 (11:47 +1000)]
Allow V4 bindings to be assigned to aliases

V4 bindings must be able to be retargetted for them to be assignable
to aliases.

Change-Id: I4d3addd0fdc90b9bf472c781d316f7f406eaf1d7
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
12 years agoAdd rect property type
Michael Brasser [Thu, 3 May 2012 06:15:35 +0000 (16:15 +1000)]
Add rect property type

Change-Id: I9a533be414dca7fcf802e767164eeb745a9f6cd0
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
12 years agoDocs for QSGimpleMaterialShader
Gunnar Sletta [Tue, 24 Apr 2012 14:08:55 +0000 (16:08 +0200)]
Docs for QSGimpleMaterialShader

Change-Id: I769eb68a1703a2cc7379af702fb888d3e9697300
Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
12 years agoSet context information for QmlErrors passed to qWarning
Kai Koehne [Tue, 27 Mar 2012 07:04:45 +0000 (09:04 +0200)]
Set context information for QmlErrors passed to qWarning

Change-Id: I88b8582e3c757407825f1e77187d725de4242b05
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
12 years agoQQmlEngineDebugService: Query Expression
Aurindam Jana [Wed, 9 May 2012 09:30:27 +0000 (11:30 +0200)]
QQmlEngineDebugService: Query Expression

If the scope object is null or if there no QML context for
the scope object, try to use the root context of the engine.

Change-Id: I0068ea36f18a179b44791b81a2f6b8ec5423f615
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
12 years agoDocument some more functions on the Qt object
Alan Alpert [Fri, 4 May 2012 05:30:50 +0000 (15:30 +1000)]
Document some more functions on the Qt object

The Qt object has several methods which are not documented on its page.
While they don't fit neatly into the existing groups, they should be
listed there somehow so that the docs are more findable.

Change-Id: Ief7e58a3e1d9a52989d74389b9c1ecd9e7569dbf
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoAugment performance docs
Alan Alpert [Thu, 3 May 2012 04:02:14 +0000 (14:02 +1000)]
Augment performance docs

Change-Id: I5721b5b567712818462b51a85c7710bc6a08746b
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoFix potential crash and leak in Binding.
Michael Brasser [Wed, 9 May 2012 00:25:20 +0000 (10:25 +1000)]
Fix potential crash and leak in Binding.

With this patch, Binding will always correctly restore the original
binding when it becomes inactive (previously it would sometimes restore
a deleted binding). In the future we may want to consider changing to
retore the most recently set binding instead (it's currently unclear
whether either is a better model).

Change-Id: Iddde49de0815b2334ec3369963048554d1c8e105
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoScriptAction without scriptName shouldn't match a StateChangeScript
Michael Brasser [Wed, 9 May 2012 01:50:01 +0000 (11:50 +1000)]
ScriptAction without scriptName shouldn't match a StateChangeScript

Change-Id: Idfce9b25fd2396771f45fc2487bc363edb56ddd6
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoReturn earlier if script.context() is invalid
Charles Yin [Wed, 9 May 2012 01:50:47 +0000 (11:50 +1000)]
Return earlier if script.context() is invalid

If script.context() is invalid, the qml expression is invalid too,
so no need to continue contructing the expression at all.

Change-Id: I5a34cf0eb1c2cc0b2bba7eed736073050f3240e9
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoDefence programming: add more asserts
Charles Yin [Wed, 9 May 2012 01:39:53 +0000 (11:39 +1000)]
Defence programming: add more asserts

Change-Id: If432e09ce1c4e556a6b0265ca7255ad5325d0e5d
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoMove check for whether a layout is already in progress
Bea Lam [Thu, 3 May 2012 03:42:13 +0000 (13:42 +1000)]
Move check for whether a layout is already in progress

Move it out of applyModelChanges() into layout() since that's where it
should really be checked.

Change-Id: I24093e91e2ffadd5377ba44128168939e5db54c9
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
12 years agoFix weak reference callback in test case
Chris Adams [Wed, 9 May 2012 00:21:56 +0000 (10:21 +1000)]
Fix weak reference callback in test case

Previously, the handle reference management weak-reference callback
would cast the data pointer to a class instance ptr, and clear that
instance's handle.  This is invalid if the callback gets called
after the instance is deleted.

Change-Id: I3f77bffa1cb05f8b625c69f08d85662cc3b2e5e1
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
12 years agoEmit runningChanged() signal after running count updated
Charles Yin [Wed, 9 May 2012 00:24:06 +0000 (10:24 +1000)]
Emit runningChanged() signal after running count updated

Otherwise, in onRunningChanged handler, the running property won't
be updated.

Change-Id: I3dccfb346a66c67d455f66f4af3ee8d2b9d8e33a
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoDebugger: Use new QtMessageHandler signature
Kai Koehne [Mon, 7 May 2012 12:58:26 +0000 (14:58 +0200)]
Debugger: Use new QtMessageHandler signature

Requires qtbase with change d9a1c2dff8563.

Change-Id: I11446479f8d2fce9dc5a8c914f1d1e5e3711fc57
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
12 years agoFix qmltest failure on mac
Bea Lam [Thu, 3 May 2012 07:55:09 +0000 (17:55 +1000)]
Fix qmltest failure on mac

Increase font size of text content

Task-number: QTBUG-25306

Change-Id: I1932389416290cb206818b98df79597690a2992a
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
12 years agoqsTranslate shouldn't require an encoding argument
Lars Knoll [Sun, 6 May 2012 21:14:36 +0000 (23:14 +0200)]
qsTranslate shouldn't require an encoding argument

The encoding is anyway utf-8 in all case, so we can just
as well get rid of the argument. Support the old syntax
for backwards compatibility, but issue a qWarning when it's
being used.

The new syntax simply removes the encoding as 4th argument.

Change-Id: Ib34aec58997a4f026440385e8ed763ef953674d8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoDoc: Moving QML docs for new doc structure
Jerome Pasion [Tue, 8 May 2012 07:43:20 +0000 (09:43 +0200)]
Doc: Moving QML docs for new doc structure

Change-Id: Id51e2cf10e8b5c5559bc4a375cb2db46c40bdf0a
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
12 years agoFix edge case in signal emission semantics
Chris Adams [Tue, 1 May 2012 02:11:45 +0000 (12:11 +1000)]
Fix edge case in signal emission semantics

Signal emission triggered by property changes during an onDestruction
handler was previously not well tested.  This commit adds several
unit tests to ensure correct behaviour in that situation.

Those unit tests showed a problem in signal emission related to when
children objects are cleaned up.  This commit also ensures that if
such children own their own context, their onDestruction handlers
are called prior to marking the child as deleted.

Change-Id: Ibf84ae56ba1134e5d6402b742aee1bdc0e5e4e15
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
12 years agoBetter checking top level root object creation status
Charles Yin [Tue, 8 May 2012 00:42:28 +0000 (10:42 +1000)]
Better checking top level root object creation status

Add QQmlContextData::isRootObjectInCreation flag, only set it to true in Init qml instruction,
once a root ojbect created, set it to false and set QQmlData::rootObjectInCreation to true.

Change-Id: Iba7b348ab664a472280d8d7283e93787b3dd0a56
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
12 years agoAdded environment variable for enforcing the threaded renderer.
Samuel Rødal [Thu, 3 May 2012 21:09:22 +0000 (23:09 +0200)]
Added environment variable for enforcing the threaded renderer.

On a 120 Hz display for example, the threaded renderer makes the
animations go from rubber to velvet.

Change-Id: I28175b4a063dbf5d92ec128797e811c90891b3d5
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Donald Carr <donald.carr@nokia.com>
12 years agoDoc: Moving Qt Quick docs for new doc structure
Geir Vattekar [Mon, 7 May 2012 11:06:02 +0000 (13:06 +0200)]
Doc: Moving Qt Quick docs for new doc structure

-moved documentation from
   doc/src/qtquick2
   doc/src/localstorage
   doc/src/particles
 to src/quick/doc/
-fixed qdocconf file
-fixed snippets, images, and other qdoc errors related to the new
 directories
-fixed links in the main Qt Quick page

Change-Id: Ie3408c2624f623c17de07e5635d5c7284d02b973
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
12 years agoExpose ImperialUSSystem and ImperialUKSystem to QML locale
Martin Jones [Tue, 8 May 2012 00:27:39 +0000 (10:27 +1000)]
Expose ImperialUSSystem and ImperialUKSystem to QML locale

New enums added to QLocale must be exposed in QML too.

Change-Id: I3d4ca6c63d21eaedb2e78a01b7b3d6abace92318
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
12 years agoEnable QML_IMPORT_TRACE for setImportPathList and setPluginPathList
Denis Mingulov [Tue, 1 May 2012 18:44:36 +0000 (21:44 +0300)]
Enable QML_IMPORT_TRACE for setImportPathList and setPluginPathList

Currently QQmlImportDatabase methods addPluginPath and addImportPath
are providing a debug output by QML_IMPORT_TRACE environment variable.
QQmlImportDatabase::setImportPathList and QQmlImportDatabase - do not.
So the current import/plugin path list might be inconsistent with the
provided debug output.

This commit adds support for QML_IMPORT_TRACE for both 'set' methods.

Change-Id: I52bb3c7b7e7e5c1119f5b73c7574da2952f4242d
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
12 years agoStop flicking on a full pixel.
Martin Jones [Fri, 20 Apr 2012 07:02:44 +0000 (17:02 +1000)]
Stop flicking on a full pixel.

When the user flicks/moves the view, stop on a full pixel.  This
ensures optimal presentation when static without affecting the
smoothness of animation.

Change-Id: I2d8ae084151f56d8e569fde35fb498866ad60f9c
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoRemove QQmlData::objectNameChanged callback.
Michael Brasser [Tue, 17 Apr 2012 03:54:20 +0000 (13:54 +1000)]
Remove QQmlData::objectNameChanged callback.

The objectName property now has a proper NOTIFY signal. Also
remove the objectName accessor, as it is no longer required.

Task-number: QTBUG-23526
Change-Id: Ib18ba7335bf62a2fe2a9e489cb4c0f1fb142d74c
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
12 years agoAdd documentation/links for incubateObject
Martin Jones [Tue, 8 May 2012 01:41:28 +0000 (11:41 +1000)]
Add documentation/links for incubateObject

Change-Id: I0ba05f513c6e11451b49848eb69e4b579e75f9a4
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
12 years agoDo not send double click when press was not accepted
Laszlo Agocs [Mon, 7 May 2012 10:38:14 +0000 (13:38 +0300)]
Do not send double click when press was not accepted

Sending the double click does not make sense in this case. In the
worst case something accepts the double click, leaving the mouse
grabber set, which results in blocking all further input due to having
everything delivered to that one item.

Change-Id: Ief4de360203e55e56f83179075e050f717a12108
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoSet test data directory correctly for QML profiler tests
Martin Jones [Tue, 8 May 2012 06:22:54 +0000 (16:22 +1000)]
Set test data directory correctly for QML profiler tests

Change-Id: I52f41aacb2963699394dc3ea22d6a4723b189a87
Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
12 years agoFix MSVC warning C4200 (zero-sized array in struct/union).
Friedemann Kleint [Tue, 8 May 2012 15:27:52 +0000 (17:27 +0200)]
Fix MSVC warning C4200 (zero-sized array in struct/union).

Warning C4200: nonstandard extension used : zero-sized array in
struct/union. Cannot generate copy-ctor or copy-assignment
operator when UDT contains a zero-sized array.

Change-Id: Icf23b367b88a4a4f9549cc714af2a30287027da8
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years agoAdapt to _qpa file rename in qtbase.
Girish Ramakrishnan [Tue, 8 May 2012 06:39:03 +0000 (23:39 -0700)]
Adapt to _qpa file rename in qtbase.

qtbase change 36547f4eff44361f7a6acd0cff107c0e47561f93
renamed qpa headers.

Change-Id: I903b48d145837557d305366e2eb4eedd0ad32c14
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoQmlDebugging: make sure that all data is sent on close
Christiaan Janssen [Tue, 8 May 2012 12:21:45 +0000 (14:21 +0200)]
QmlDebugging: make sure that all data is sent on close

Change-Id: I662a3865fec1e4d12d57389bfbe23d7221b6df16
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
12 years agoFix qmake logic
Kai Koehne [Mon, 7 May 2012 08:24:49 +0000 (10:24 +0200)]
Fix qmake logic

Regression introduced with 8867be2d1d92e981ed736330f036a681ce4b520b

Change-Id: I8c109399c28c729403535332f8f15df8dfe32b8d
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoAdded some documentatio notes on QSGNode::markDirty()
Gunnar Sletta [Thu, 3 May 2012 14:05:13 +0000 (16:05 +0200)]
Added some documentatio notes on QSGNode::markDirty()

Change-Id: I631d85596113c38c9f19da9e65e9cae90c3bfebf
Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoMinor optimizations and cleanup
Aaron Kennedy [Fri, 4 May 2012 12:14:43 +0000 (13:14 +0100)]
Minor optimizations and cleanup

Change-Id: Iecbd5c46af00f649b1f1d78cdf5f2b40a2844897
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
12 years agoQQmlInspector: Use qmlscene in auto tests
Aurindam Jana [Fri, 4 May 2012 13:13:11 +0000 (15:13 +0200)]
QQmlInspector: Use qmlscene in auto tests

Change-Id: I2f265409439183861c0d6d164247348db6097cb3
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
12 years agoQmlProfiler: storing binding type
Christiaan Janssen [Wed, 2 May 2012 15:32:57 +0000 (17:32 +0200)]
QmlProfiler: storing binding type

Change-Id: If1f02e1e6f6ce6aba9874a63d01a08d57571f991
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
12 years agoInitial bundle support
Aaron Kennedy [Tue, 10 Apr 2012 17:11:30 +0000 (18:11 +0100)]
Initial bundle support

Change-Id: I095249f64ecf4ef1e3fbfb164e3d50edffab61e8
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
12 years agoChange uses of {to,from}Ascii to {to,from}Latin1
Thiago Macieira [Thu, 3 May 2012 12:42:53 +0000 (14:42 +0200)]
Change uses of {to,from}Ascii to {to,from}Latin1

This operation should be a no-op anyway, since at this point in time,
the fromAscii and toAscii functions simply call their fromLatin1 and
toLatin1 counterparts.

Task-number: QTBUG-21872
Change-Id: I03084595ddc425a988374b8352fd23e9504ffba6
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
12 years agoFix tile rendering bug for context2d
Charles Yin [Fri, 4 May 2012 01:21:14 +0000 (11:21 +1000)]
Fix tile rendering bug for context2d

aboutToDraw() should be called before checking the painter device,
if no device, aboutToDraw() will create a new one.

Also just release the FBO when delete tile, not need to release the fbo
after each draw.

Change-Id: Ida5954f1c65f25f0ce273f732c1608ed49bc148c
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoAdd more warnings
Charles Yin [Fri, 4 May 2012 01:18:08 +0000 (11:18 +1000)]
Add more warnings

renderTaraget and renderStrategy are not allowed to be modified once
context was initialized.

Change-Id: Ic0aa493b4e686a063c318a1d1ec912c176e47ed4
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoImplement QQuickContext2DRenderThread class for threaded context2d rendering
Charles Yin [Thu, 3 May 2012 13:31:17 +0000 (23:31 +1000)]
Implement QQuickContext2DRenderThread class for threaded context2d rendering

Change-Id: I221690c730fd412b23705c0d687d1abbac38974d
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoEnsure binding target has not been deleted
Matthew Vogt [Thu, 26 Apr 2012 23:15:11 +0000 (09:15 +1000)]
Ensure binding target has not been deleted

Prevent the evaluation of bindings if the target has been deleted.
Also, mark an item as queued for deletion at the beginning of the
destructor call chain, so that bindings triggered by the operation
of the destructor itself are not evaluated (after the context is
destructed, if necessary).

Task-number: QTBUG-25516
Change-Id: I587ef7923eb749eb7980156ad73822c1fb7c1ff3
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoChange Qt::MiterJoin to Qt::SvgMiterJoin for context2d join
Charles Yin [Fri, 4 May 2012 01:25:51 +0000 (11:25 +1000)]
Change Qt::MiterJoin to Qt::SvgMiterJoin for context2d join

Qt::MiterJoin has different behavior with HTML5 context2d spec, fortunately Qt::SvgMiterJoin is the right one.

Change-Id: Ice50c6f92b244a4d39f984510f76146682b02f07
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoEmit Component.onDestruction before context is invalidated
Matthew Vogt [Fri, 27 Apr 2012 06:12:09 +0000 (16:12 +1000)]
Emit Component.onDestruction before context is invalidated

When a component no longer has any live references, emit the
destruction signal immediately so that handlers are run before the
associated V8 resources are invalidated.  Also, when the root
context of the engine is destroyed, emit the destruction signal
before destroying any resources needed to process the resulting
binding invocations.

Change-Id: I722dd6e4b60c499b533fc45e33b61e95bca6187f
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoRefactor canvas item unit tests
Charles Yin [Thu, 3 May 2012 05:21:08 +0000 (15:21 +1000)]
Refactor canvas item unit tests

Change-Id: I99ba84889ce360d2def27834f15af43c2bdf29bc
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoSet ptr to zero after freeing memory
Chris Adams [Fri, 27 Apr 2012 07:42:06 +0000 (17:42 +1000)]
Set ptr to zero after freeing memory

This commit ensures that we set the notifyList to zero after
freeing it, to avoid possibility of dereferencing freed memory.

Change-Id: I0ce90507ad209748642a218608e118e5034bfabd
Reviewed-by: Martin Jones <martin.jones@nokia.com>