profile/ivi/qtdeclarative.git
12 years agoRemove deprectated MultiPointTouchArea signals.
Michael Brasser [Fri, 18 May 2012 03:03:22 +0000 (13:03 +1000)]
Remove deprectated MultiPointTouchArea signals.

Change-Id: Icea6d17704b2ddb7917bc0c0fea11dd625562685
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoOptimize QML type registration.
Martin Jones [Fri, 18 May 2012 00:54:09 +0000 (10:54 +1000)]
Optimize QML type registration.

Change-Id: I981f5e2e6d7f6089e9f326d41a65e54668b73120
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoIntroduce a new constructor to QQuickView
Charles Yin [Thu, 3 May 2012 01:36:36 +0000 (11:36 +1000)]
Introduce a new constructor to QQuickView

Make it possible let QQuickView use an existing qml engine
and multiple QQuickView objects can share one QQmlEngine instance.

Change-Id: I035d1c15155be22f1131b504c40cf4ffb5da0f45
Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
12 years agoAdd unit tests for SVG path
Charles Yin [Tue, 22 May 2012 01:37:50 +0000 (11:37 +1000)]
Add unit tests for SVG path

Change-Id: I4358416ccf973940fbd54633254274ba0a18e777
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoRemoved CONFIG+=parallel_test from suspected parallel-unsafe test [2]
Rohan McGovern [Wed, 23 May 2012 00:20:10 +0000 (10:20 +1000)]
Removed CONFIG+=parallel_test from suspected parallel-unsafe test [2]

This test has failed a parallel stress test and may contribute to
instability in test runs.

Change-Id: I7db5313078f3b3b9a7ae59facd5dbcb03777e7b8
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
12 years agoOnly preallocate 1 change listener per animation instance
Charles Yin [Fri, 18 May 2012 02:04:17 +0000 (12:04 +1000)]
Only preallocate 1 change listener per animation instance

In most cases, only one animation change listener is added to animation instance,
so change QPODVector's Increment parameter from 4 to 1 can save 24 bytes (8 bytes for each listener) per animation instance.

Change-Id: Iaf50016899963689f2bf84c3dd14fcd05c306d21
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoAdd completeToBeginning()/completeToEnd() to animation controller
Charles Yin [Thu, 17 May 2012 04:43:43 +0000 (14:43 +1000)]
Add completeToBeginning()/completeToEnd() to animation controller

Change-Id: I1abac96754cc82c8e0e00c58a27c09b68c5075c1
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoUse the default timeout for tryCompare
Charles Yin [Tue, 22 May 2012 06:14:27 +0000 (16:14 +1000)]
Use the default timeout for tryCompare

Even with this fix, the test still fails in CI,
so mark this test as insignificant until we figure out the real reason.

Change-Id: Idd07820c63b0c9627c86ed87f97b5ade6a552f7e
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoAdd QQuickCanvas::update()
Gunnar Sletta [Wed, 16 May 2012 18:16:07 +0000 (20:16 +0200)]
Add QQuickCanvas::update()

We would like to make a distinction between QQuickItem::update()
which triggers updatePaintNode() to synchronize the scene
graph and requesting the toplevel QQuickCanvas to be repainted.

If we have this distinction in place it is possible for the
scene graph to detect that the scene is unchanged and avoid
rendering unless the user has explicitely asked for the
canvas to be repainted, which is often the case when hooking
into QQuickCanvas::beforeRender().

Change-Id: Ibe77f58423593deb217ef9f8082fa12009f45daf
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoReexport the shader effect texture
Gunnar Sletta [Tue, 22 May 2012 12:14:11 +0000 (14:14 +0200)]
Reexport the shader effect texture

Change-Id: I4fd2b40bc2ed6bb977cb410a4822517f750f53ff
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
12 years agoReplace (un)checkAction with toggleAction (2/3)
Jan-Arve Saether [Tue, 22 May 2012 07:04:59 +0000 (09:04 +0200)]
Replace (un)checkAction with toggleAction (2/3)

Needed in order to finalize the replacement of {check,uncheck}Action
with toggleAction.

Change-Id: I7328275aa86cf4e8dc093f86597529b41fefd4a6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoQtDeclarative: Fix warnings about deprecated QCoreApplication::translate().
Friedemann Kleint [Mon, 21 May 2012 10:38:46 +0000 (12:38 +0200)]
QtDeclarative: Fix warnings about deprecated QCoreApplication::translate().

Change-Id: I4abd4ee98ca9d4267c5ad71d3b9c2e7d5de60902
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoQuick/QQuickFontLoader: Output warning on failure.
Friedemann Kleint [Tue, 22 May 2012 06:28:04 +0000 (08:28 +0200)]
Quick/QQuickFontLoader: Output warning on failure.

Helps in case the 'file::' prefix is missing from local file URLs
on Windows. 'C:\foo' is then interpreted as URL with protocol
'c', causing an error.

Change-Id: I252ab453a7ce241f3bd290ef59d3106110146662
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
12 years agoDoc: Added two new articles for the QML documentation
Jerome Pasion [Tue, 22 May 2012 10:04:25 +0000 (12:04 +0200)]
Doc: Added two new articles for the QML documentation

-for the new documentation structure

Change-Id: I5b047fb47e479eb1ae25bd44f8e29b6b705f1b83
Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
12 years agoAccessibility: Implement invisible and checkable state
Jan-Arve Saether [Tue, 15 May 2012 12:26:09 +0000 (14:26 +0200)]
Accessibility: Implement invisible and checkable state

Change-Id: I3a079b4171e611b0136ef1582f6f16f71cf8f340
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agodoc fix
Charles Yin [Mon, 21 May 2012 04:50:40 +0000 (14:50 +1000)]
doc fix

renderTarget/renderStrategy property type should be enumeration.

Change-Id: I454c5c1d7b5be8290a25b81f8a9b9a54ebf515ec
Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
12 years agoExamples cleanup
Alan Alpert [Mon, 14 May 2012 03:52:41 +0000 (13:52 +1000)]
Examples cleanup

Rename calculator/CalculatorCore to calculator/content for consistency.
Also fix license headers in calculator and samegame to be the examples
license instead of the source license.

Change-Id: Ia2254fcd7cce1114199921ede91bf8f032058f77
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoRemoved CONFIG+=parallel_test from suspected parallel-unsafe tests
Rohan McGovern [Mon, 21 May 2012 22:45:27 +0000 (08:45 +1000)]
Removed CONFIG+=parallel_test from suspected parallel-unsafe tests

These tests have failed a parallel stress test and may contribute to
instability in test runs.

Change-Id: I8d82e9df7df6cac374b8b2eda43de8e96b676972
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoDebugger: Response for DESTROY_OBJECT request sent correctly
Simjees Abraham [Mon, 21 May 2012 12:22:08 +0000 (14:22 +0200)]
Debugger: Response for DESTROY_OBJECT request sent correctly

The response for request DESTROY_OBJECT is sent after the
object has been destroyed. This enables the creator to
sync the objects tree displayed for debugging.

Change-Id: Icedaf92df4402f067fd5b8590811c770e4b9063e
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
12 years agoSimplify a type name query.
Jędrzej Nowacki [Fri, 18 May 2012 15:21:09 +0000 (17:21 +0200)]
Simplify a type name query.

QVariant::typeToName is calling QMetaType::typeName and returns the same
data.

Change-Id: I4028f54ef318292e27eaa0e6981ea114e6e6cd52
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
12 years agoSimplify QVariant::convert and QVariant::canConvert calls.
Jędrzej Nowacki [Fri, 18 May 2012 15:30:03 +0000 (17:30 +0200)]
Simplify QVariant::convert and QVariant::canConvert calls.

QVariant::Type casts are not necessary in Qt5.

Change-Id: Ia2e7d8fa367a59c23bd06993db36d96a0a46a229
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
12 years agoQtDeclarative: Fix warning about construction of a QString from ASCII.
Friedemann Kleint [Mon, 21 May 2012 10:41:37 +0000 (12:41 +0200)]
QtDeclarative: Fix warning about construction of a QString from ASCII.

Change-Id: I893fc4cb9741ec930e35fabdc9bdccca0e467e5e
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
12 years agoQtDeclarative: Fix warnings about uninitialized variables.
Friedemann Kleint [Mon, 21 May 2012 11:41:43 +0000 (13:41 +0200)]
QtDeclarative: Fix warnings about uninitialized variables.

Change-Id: Ie918f1e813b243b250cedfc2e94e9c66288d08e3
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
12 years agodoc: Added missing qdoc text
Martin Smith [Mon, 21 May 2012 09:05:11 +0000 (11:05 +0200)]
doc: Added missing qdoc text

A \table command was not matched by a
\entable command, and the qdoc comment
for one \qmlproperty command was not
terminated, so that a second \qmlproperty
command appeared in the same comment.

Change-Id: I398e8afd1dba84a74b62b6881990de81070c24b7
Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com>
12 years agoNull out the d pointer in QQuickMouseEventEx dtor
Laszlo Agocs [Mon, 21 May 2012 06:30:07 +0000 (09:30 +0300)]
Null out the d pointer in QQuickMouseEventEx dtor

Otherwise every single app will assert in ~QEvent when
QML_TRANSLATE_TOUCH_TO_MOUSE is enabled.

Change-Id: Ib0590a980cb00b913ec096bcdfba57fffaa19eb1
Reviewed-by: Shawn Rutledge <shawn.rutledge@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQml : Resetting binding corrected
Simjees Abraham [Wed, 16 May 2012 13:20:59 +0000 (15:20 +0200)]
Qml : Resetting binding corrected

Resetting the binding for property corrected in case the property is
nested (eg: font.bold)

Task-number: QTCREATORBUG-6294
Change-Id: I39cca54c17860c4e6df1cf864cc2f70214d50c8f
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
12 years agoFix crash in QQuickVisualDataModel test.
Andrew den Exter [Fri, 18 May 2012 06:07:52 +0000 (16:07 +1000)]
Fix crash in QQuickVisualDataModel test.

"item" + 1 will not concatenate.

Change-Id: Icea095fd3183ba1b0e9b0e19b0c1fb6758f39ff3
Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
12 years agoAlways emit signal after ShaderEffectSource::scheduleUpdate().
Kim Motoyoshi Kalland [Fri, 18 May 2012 12:23:29 +0000 (14:23 +0200)]
Always emit signal after ShaderEffectSource::scheduleUpdate().

The scheduledUpdateCompleted signal was originally added so that
you can take some action after updating a ShaderEffectSource with
scheduleUpdate(). However, before this commit, the signal would
not be emitted if the ShaderEffectSource was already up-to-date.
Instead, the signal would be delayed until the next time the
ShaderEffectSource was redrawn. This commit ensures the signal is
emitted even if the ShaderEffectSource is already up-to-date.

Change-Id: Idd22cdea1f7c14ed7a45081c98b8cfbef896dccd
Reviewed-by: Kim Gronholm <kim.1.gronholm@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoRemove unused variable.
Kim Motoyoshi Kalland [Fri, 18 May 2012 11:53:27 +0000 (13:53 +0200)]
Remove unused variable.

Change-Id: I49fee9c96a9f1b54a790d2dd8a3d1f0a3c7f8a5a
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoEnsure repeated compilation does not fail
Matthew Vogt [Mon, 21 May 2012 03:40:22 +0000 (13:40 +1000)]
Ensure repeated compilation does not fail

Failure could result from the allocation of an address previously used
for the same class.  The test is repeated for a surprisingly large
count of repetitions to increase the chance of this occurring.

Change-Id: I045902c50021f23adbbd61fccf41b9c38657387a
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
12 years agoDetect and abort if an object is deleted during signal handling
Kent Hansen [Wed, 16 May 2012 06:58:37 +0000 (08:58 +0200)]
Detect and abort if an object is deleted during signal handling

If an object gets deleted while one of its own signal handler
expressions is being evaluated, a subsequent crash is inevitable.

While we could introduce guards/checks in the signal handler kernel
(QMetaObject::activate(), QQmlNotifier::emitNotify() and friends) to
detect and mask the sender deletion, this arguably isn't helpful; the
code that emitted the signal is likely to access member variables
directly after emitting the signal, causing semi-random crashes.

This situation is a symptom of misbehaving application code. Catch it
early rather than later, and issue a qFatal() with a helpful message.
Coupled with a backtrace, this should make it easier to track down
the flawed C++ application logic.

Change-Id: I8c77800e49c475def613224f208181c2d0af60e6
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years agoDoc: Moved and added Qt Quick and Qt QML documentation.
Jerome Pasion [Wed, 16 May 2012 14:15:57 +0000 (16:15 +0200)]
Doc: Moved and added Qt Quick and Qt QML documentation.

-moved the documentation to separate aspects:
    QML the language
    QML engine
    QML bindings
-fixed landing page for Qt Quick
-removed duplicate module pages
-added content as a base structure
-added Qt QML source in the Qt Quick module documentation

Part of QTBUG-25689

Change-Id: Ib12ceedfbd689a9f764a91e669bc7c2a433643aa
Reviewed-by: Peter Yard <peter.yard@nokia.com>
Reviewed-by: Bea Lam <bea.lam@nokia.com>
12 years agoFixed missing repaints with threaded renderer.
Samuel Rødal [Sat, 19 May 2012 11:19:09 +0000 (13:19 +0200)]
Fixed missing repaints with threaded renderer.

Update when we get an expose event, like the trivial renderer does.

Change-Id: Ib95559da35b94d84c0935c6abb24fdfb1e05fa1c
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoImprove detection of deleted VisualDataModel items.
Andrew den Exter [Wed, 28 Mar 2012 06:30:50 +0000 (16:30 +1000)]
Improve detection of deleted VisualDataModel items.

The data object for each delegate object has a pointer guard with a
virtual objectDestroyed() function, that's a better tool for detecting
deletion than the destructor of a child object.

Change-Id: Iad1516e3daeb5e019ece6c3b2eb65da768cf43cb
Reviewed-by: Bea Lam <bea.lam@nokia.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoInitialize VisualDataModel v8 object constructor on demand.
Andrew den Exter [Wed, 28 Mar 2012 05:28:33 +0000 (15:28 +1000)]
Initialize VisualDataModel v8 object constructor on demand.

Avoid allocating data that isn't needed.

Change-Id: I6f1d55f535599516a8b5e711f977e81afd337bd6
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoRefactor QQuickVisualAdaptorModel to reduce memory consumption.
Andrew den Exter [Fri, 16 Mar 2012 05:37:14 +0000 (15:37 +1000)]
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 (16:56 +1000)]
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 (13:23 +1000)]
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 (15:51 +1000)]
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 (16:50 +1000)]
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 (09:02 +1000)]
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 (12:59 +1000)]
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 (17:49 +1000)]
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 (13:40 +1000)]
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 (08:32 +1000)]
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 (12:31 +1000)]
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 (16:01 +1000)]
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 (09:35 +1000)]
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 (16:07 +1000)]
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 (16:05 +1000)]
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 (20:22 -0700)]
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 (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>