konrad/qtdeclarative.git
12 years agoRefactor QQuickVisualAdaptorModel to reduce memory consumption.
Andrew den Exter [Fri, 16 Mar 2012 05:37:14 +0000]
Refactor QQuickVisualAdaptorModel to reduce memory consumption.

Don't inherit from QObject.
Use a single QQmlGuard for all model types, and reset the model
property if the model is deleted.
Construct v8 object template on demand.
Store model type specific data in a separate class that is allocated
on demand.

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

12 years agoAllow the existence of a VME metaobject to be asserted
Matthew Vogt [Tue, 15 May 2012 06:56:40 +0000]
Allow the existence of a VME metaobject to be asserted

Test for the existence of a VME metaobject.  Otherwise, assertion of
a static cast result is not meaningful.

Change-Id: Ic9e9c38e5dce65c41d20e405c33e179334c37b00
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Reviewed-by: Chris Adams <christopher.adams@nokia.com>

12 years agoRemove dead code from QQmlNotifierEndpoint
Chris Adams [Fri, 18 May 2012 03:23:09 +0000]
Remove dead code from QQmlNotifierEndpoint

The copyAndClear() function is unused and untested.

Change-Id: I75cece92e4af691c03c6b7251be3182fa10cfe6c
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>

12 years agoImprove memory usage of Connections and signal handlers.
Michael Brasser [Mon, 14 May 2012 05:51:28 +0000]
Improve memory usage of Connections and signal handlers.

Following the pattern of 330152354aed8496ac78d145e14b25ee2d7bf8fb, store
the source as Utf8. Keep one less copy of the source when possible.

Change-Id: Ifa5f5fdc9ea3d48e904489dc262145eff36e710c
Reviewed-by: Chris Adams <christopher.adams@nokia.com>

12 years agoRemove QSKIP from test.
Andrew den Exter [Thu, 17 May 2012 06:50:44 +0000]
Remove QSKIP from test.

Fix merged in qtbase.

Task-number: QTBUG-24801

Change-Id: I41de3b20938bd63861fba14a43b23ed8d91414d5
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>

12 years agoRemove unnecessary exports
Matthew Vogt [Mon, 14 May 2012 23:02:09 +0000]
Remove unnecessary exports

Reduce library load time by removing any exports which are not required
by existing clients.

Task-number: QTBUG-24768
Change-Id: Ia5754d6f97bb2ed46e290820a5b092f85a4bc5b0
Reviewed-by: Martin Jones <martin.jones@nokia.com>

12 years agoAdd optional width and height arguments to mapToItem()/mapFromItem()
Yann Bodson [Wed, 16 May 2012 02:59:32 +0000]
Add optional width and height arguments to mapToItem()/mapFromItem()

When specifying the width and height from QML, mapToItem()/mapFromItem()
will use QQuickItem::mapRectToItem (and mapRectFromItem).

Task-number: QTBUG-25755
Change-Id: Iae87671913623969d7428dd008afaa6faf3faf33
Reviewed-by: Martin Jones <martin.jones@nokia.com>

12 years agoOptimize type resolution
Martin Jones [Wed, 16 May 2012 07:49:32 +0000]
Optimize type resolution

Faster qmlType() and resolveType() lookup.

Change-Id: I096439f23bf6071e8bfdf0cda366cc71e00293ba
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>

12 years agoImprove composite property type unit test
Chris Adams [Thu, 17 May 2012 03:40:50 +0000]
Improve composite property type unit test

Previously, the test ensured that the (variant) value returned by
QQmlProperty::read() was identical to that returned by
QMetaProperty::read(), which isn't the case if an engine is passed
to the QQmlProperty constructor.  This commit expands the unit test
to ensure that the actual QObject-ptr value is identical, rather
than the variant value (which may have differing type information),
regardless of whether an engine is passed in or not.

For list properties, the individual values are (in general) not able
to be accessed, and so the unit test for list properties is relaxed.

Change-Id: Iec40dca147a0bb793359b28facbcae69cc49c1ad
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>

12 years agoAdd QQmlEngine::trimComponentCache()
Matthew Vogt [Thu, 3 May 2012 22:32:45 +0000]
Add QQmlEngine::trimComponentCache()

Allow unused data in the engine's component cache to be safely discarded
so that the memory can be freed for other purposes.

Unloading of scripts that are no longer required after trimming unused
components is not yet supported.

Task-number: QTBUG-25653
Change-Id: I37bc9d5592eeb5edceeb34d010a555dcffd11cea
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>

12 years agoFix signal handlers for signals with default arguments.
Michael Brasser [Wed, 16 May 2012 02:31:59 +0000]
Fix signal handlers for signals with default arguments.

For cloned signals, connect to the index of the original. This was a
regression caused by the switch to QQmlNotifierEndpoint for signal
handlers. This change also makes parameters with default arguments
available from QML, while previously they were unavailable.

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

12 years agoMore defense programming in animation code
Charles Yin [Wed, 9 May 2012 06:01:51 +0000]
More defense programming in animation code

1. Add more deletion checkings in animation job code
2. Add some more asserts

Change-Id: I34772792ea4638b61eb2c3d65da5d35ce75183d7
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>

12 years agoSkip failing test.
Andrew den Exter [Wed, 16 May 2012 23:35:34 +0000]
Skip failing test.

Fix in qtbase can't be merged until the QEXPECT_FAIL's are removed.

Change-Id: Id416627cce3074549eda13331b7a88cc0313a910
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>

12 years agoFix incorrect text alignment in TextEdit.
Andrew den Exter [Wed, 16 May 2012 06:07:47 +0000]
Fix incorrect text alignment in TextEdit.

QTextDocument always spans the full width of a TextEdit so the text
node shouldn't be offset by the x position of the bounding rect.

Change-Id: I882a44baeea4d054279cadc5632df6d8863caea1
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>

12 years agoOnly genereate new texture if texture id is 0
Charles Yin [Wed, 16 May 2012 06:05:06 +0000]
Only genereate new texture if texture id is 0

Otherwise a new texture would be created for accessing textureId()
function everytime and even worse thing is these textures will never
been deleted and eventually cause gl out of memory.

Change-Id: I349fcf15b5aeabbd9420a8dd645e0fdcc1d256bf
Reviewed-by: Glenn Watson <glenn.watson@nokia.com>

12 years agoUsing QStringLiteral or QLatin1String instead of QLatin1Literal
Debao Zhang [Tue, 24 Apr 2012 03:22:22 +0000]
Using QStringLiteral or QLatin1String instead of QLatin1Literal

Change-Id: Ie1435f1ac5c81d8781e7118121ed07c7202ab124
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>

12 years agoRemoved ### from scenegraph
Gunnar Sletta [Wed, 16 May 2012 12:41:30 +0000]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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>