profile/ivi/qtdeclarative.git
11 years agofollow rename of qt_module_config.prf to qt_module.prf
Oswald Buddenhagen [Tue, 7 Aug 2012 17:08:54 +0000 (19:08 +0200)]
follow rename of qt_module_config.prf to qt_module.prf

Change-Id: I8a13b3aca195b9e8331478d73cd338ab66d65d1f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
11 years agoMore consistent examples directory structure
Alan Alpert [Thu, 9 Aug 2012 01:24:20 +0000 (11:24 +1000)]
More consistent examples directory structure

Under examples the next directory level distinguishes imports/modules
and the next directory level distinguishes examples.

Change-Id: Icabadaac6ccb9c1c424efa9c9e64a7d94bc7c0da
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
11 years agoPermit value types with metatype IDs >= QMetaType::User
Matthew Vogt [Wed, 1 Aug 2012 00:27:17 +0000 (10:27 +1000)]
Permit value types with metatype IDs >= QMetaType::User

Remove the assumption that value types must be types defined by
Qt, having metatype IDs below QMetaType::User.

Task-number: QTBUG-26352
Change-Id: Ib5a56ff2e7892e82adf17a3a1e7517a0c9fe0534
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
11 years agoRemove remnants of QQmlImageProvider
Kent Hansen [Wed, 8 Aug 2012 11:13:25 +0000 (13:13 +0200)]
Remove remnants of QQmlImageProvider

QQmlImageProvider was renamed to QQuickImageProvider quite some time
ago.

Change-Id: I2f737f1e2a543c0abb0f45170499c41de25cf696
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
11 years agoAdd unit test for concatenated property name access
Chris Adams [Thu, 9 Aug 2012 05:01:13 +0000 (15:01 +1000)]
Add unit test for concatenated property name access

Task-number: QTBUG-23126
Change-Id: I706d5f4ba49a554c3816146f15a87e001cde9a3f
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
11 years agoImprove main QtQml and QtQuick doc pages
Bea Lam [Thu, 9 Aug 2012 02:07:02 +0000 (12:07 +1000)]
Improve main QtQml and QtQuick doc pages

Make the content of the two pages more consistent with one
another. Also improve the reference documentation sections and
fix some links.

Also the apireferences.qdoc page is not necessary.

Change-Id: I01c5b3757c2ec03b1365e4c9c348e33e06f8315f
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
11 years agoFix default property docs
Bea Lam [Thu, 9 Aug 2012 05:09:16 +0000 (15:09 +1000)]
Fix default property docs

Item's default property is data.

Change-Id: I60577f4cfbe954ab3311703915f43fecf4ed9bf2
Reviewed-by: Bea Lam <bea.lam@nokia.com>
11 years agoChange error messages to reflect new module terminology
Chris Adams [Wed, 8 Aug 2012 06:31:50 +0000 (16:31 +1000)]
Change error messages to reflect new module terminology

Previously, modules which registered types into a protected type
namespace were known as "strict" modules; now they are known as
"identified" modules.

This commit also adds a unit test to ensure that the module identifier
directive is the first command in the qmldir file.

Change-Id: I90e9d2c5b51ecb2b9d058c9fe9d9310fd3cd4f45
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
Reviewed-by: Bea Lam <bea.lam@nokia.com>
11 years agoAllow invokable functions of value-type classes to be called
Chris Adams [Mon, 16 Jul 2012 06:32:49 +0000 (16:32 +1000)]
Allow invokable functions of value-type classes to be called

Previously, invokable functions of value-type classes were returned as
properties.  This commit fixes that bug by allowing such functions to
be invoked normally.  It also improves copy-value type handling.

This commit also ensures that QMatrix4x4 value types are constructed
with qreal values as this is the storage type used internally.

Change-Id: Iab0fe4c522ed53d60154e8a8d46dda925fb9f4de
Reviewed-by: Martin Jones <martin.jones@nokia.com>
11 years agoEnsure that copy sequences can be passed as arguments
Chris Adams [Wed, 8 Aug 2012 04:53:45 +0000 (14:53 +1000)]
Ensure that copy sequences can be passed as arguments

Previously, automatic conversion from JS array to sequence copy
resource was not performed in the case where the array was passed as
a parameter to a QObject function invocation.  This commit adds code
to check if the parameter type is a sequence type - and if so, and if
the value is a variantlist, we convert it to a sequence of the
appropriate type.

Change-Id: I3cc3e2f95604bc71d1d8d237e1acffa1e03b78ba
Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
11 years agoFix test failures in Qt Location with string lists.
Glenn Watson [Thu, 9 Aug 2012 00:59:31 +0000 (10:59 +1000)]
Fix test failures in Qt Location with string lists.

Cloning the V8 prototype introduces some unexpected behaviour in
the way string lists are used in Qt Location. Instead, leave the
prototype intact and used a named property accessor to return the
sort method for sequence wrappers.

A test case will be added to declarative once a more isolated test
case has been created.

Change-Id: I533a66f60af4394a2cc8c938fdfc13bd193f0065
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
11 years agocanvas-related doc fixes
Bea Lam [Mon, 6 Aug 2012 04:21:58 +0000 (14:21 +1000)]
canvas-related doc fixes

- Fully qualify names in \qml* commands
- Remove unnecessary 'void' return types in \qmlmethod commands
- Remove unnecessary module and type qualifiers from links
- Document Canvas::onImageLoaded()

Change-Id: I32d1a7a54c407ae98b60857780f5536c6d52fca2
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
11 years agoDocument some undocumented AnimatedSprite functions
Bea Lam [Wed, 8 Aug 2012 06:34:21 +0000 (16:34 +1000)]
Document some undocumented AnimatedSprite functions

Change-Id: If6ac34a989d5770b1f3e2481a01ee57ad89f7707
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
11 years agoVarious small doc fixes and improvements
Bea Lam [Wed, 8 Aug 2012 06:33:05 +0000 (16:33 +1000)]
Various small doc fixes and improvements

Adds some missing docs and fixes some incorrect doc references.

Also removes AnimatedImage docs that were exactly the same
as those in base Image type docs.

Change-Id: I1357d3c00e63f1b08683bb78246de93dcc0dac7f
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
11 years agoUncomment examples in pro file
Alan Alpert [Tue, 7 Aug 2012 07:37:20 +0000 (17:37 +1000)]
Uncomment examples in pro file

Examples all seem to build and install fine, and no task number was
mentioned in the pro file.

Change-Id: Ie836385683287467618749456247684456721866
Reviewed-by: Bea Lam <bea.lam@nokia.com>
11 years agoFix uses of \inmodule, \inqqmlmodule and \since
Bea Lam [Wed, 8 Aug 2012 06:33:34 +0000 (16:33 +1000)]
Fix uses of \inmodule, \inqqmlmodule and \since

Some classes and QML types were missing these or had the wrong values.

Change-Id: Ic6376b8b450301f8ae0549e636f4bc2db4400f2b
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
11 years agoAdd more to visual parent docs
Bea Lam [Fri, 3 Aug 2012 07:29:47 +0000 (17:29 +1000)]
Add more to visual parent docs

Change-Id: I57de0f9f55c3a32da991032f7d8246518d637c15
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
11 years agoRename "JavaScript" section title
Bea Lam [Wed, 8 Aug 2012 06:49:42 +0000 (16:49 +1000)]
Rename "JavaScript" section title

This was causing every mention of "JavaScript" in the docs to
link to this section.

Change-Id: Ib6cfd1aa7559305fc08d758a41dbd4176f7501e5
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
11 years agoUpdate imports and module documentation
Chris Adams [Mon, 6 Aug 2012 02:15:32 +0000 (12:15 +1000)]
Update imports and module documentation

Recently, the qmldir syntax was modified to allow a module identifier
directive to be specified.  This allows us to guarantee that types
provided in that namespace are not overridden by other modules.

Given this fundamental change, the documentation needed to be updated
to reflect the new terminology surrounding imports:
   - modules
       - identified vs legacy
   - directories
       - local and remote directory imports
   - JavaScript resources
       - scripts which can be imported directly

Change-Id: I5a3d38de93d0186e79b87f2b3050f2b802088348
Reviewed-by: Bea Lam <bea.lam@nokia.com>
11 years agoAdd missing VisualDataGroup documentation.
Andrew den Exter [Mon, 6 Aug 2012 07:36:20 +0000 (17:36 +1000)]
Add missing VisualDataGroup documentation.

Change-Id: I7d1a948dfcfec5fca87ddc393fdb75f544526e56
Reviewed-by: Bea Lam <bea.lam@nokia.com>
11 years agoProvide features/use-case docs in QML AppDevGuide
Alan Alpert [Thu, 19 Jul 2012 01:05:05 +0000 (11:05 +1000)]
Provide features/use-case docs in QML AppDevGuide

The most common use-cases should have easily-accessible solutions
available from the front-page of the QML application developer guide.
This commit adds that documentation.

Task-number: QTBUG-26428
Change-Id: Id15e76db15fbe3599e9ac5dd98e74ad4e034ece4
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
11 years agoAdd type name to singleton (module api) implementations.
Glenn Watson [Tue, 24 Jul 2012 01:41:50 +0000 (11:41 +1000)]
Add type name to singleton (module api) implementations.

This change renames the previous module api implementation
to singleton types.

When a singleton type is registered, a type name must be provided
that is used when accessing the API from QML. This makes the
implementation more consistent with the rest of QML.

Task-number: QTBUG-26549
Change-Id: Iab0bb1ccf516bd3ae20aee562a64d22976e0aecd
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
11 years agoAllow signal parameters which are custom QML object-types
Chris Adams [Fri, 13 Jul 2012 05:53:04 +0000 (15:53 +1000)]
Allow signal parameters which are custom QML object-types

This commit allows lazy resolution of signal parameter types, which
allows QML object types to be used as signal parameters.  If a signal
is emitted with an incorrect parameter type, it will be passed through
as a null parameter.

Task-number: QTBUG-14550
Change-Id: I7e899ad57452826cc405bed10c541f8d35789d04
Reviewed-by: Martin Jones <martin.jones@nokia.com>
11 years agoFix uses of various qml doc commands
Bea Lam [Mon, 6 Aug 2012 04:25:24 +0000 (14:25 +1000)]
Fix uses of various qml doc commands

Signals documented with \qmlsignal should indicate handler name,
i.e. 'onSignal' rather than 'signal'.

Methods documented with \qmlmethod do not need to document 'void'
return values.

Also the name of any documented attribute should be qualified
with 'QtQuick2::<qmltype>'.

Change-Id: I206dd9e8f39c3b84e029ae9d4101b05d0bfb3478
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
11 years agoSupport JS Array.sort() function for sequence wrappers.
Glenn Watson [Wed, 18 Jul 2012 03:20:00 +0000 (13:20 +1000)]
Support JS Array.sort() function for sequence wrappers.

The V8 natve sort implementation calls some functions that are
incompatible with the way sequence wrappers work. In particular,
it calls an internal length() function which does not pass through
the length accessor provided by sequence wrappers, so the sort
function always thinks the array is zero length. Instead, clone the
array prototype and override the sort function with one that is
specific to sequence wrappers.

Task-number: QTBUG-25269
Change-Id: Ic83b9ee0bd3a0707e512f28057f0f99b432fded4
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
11 years agoExplicitly initialize base class.
Andrew den Exter [Tue, 7 Aug 2012 05:16:05 +0000 (15:16 +1000)]
Explicitly initialize base class.

Fixes warning.

Change-Id: I29a694fae4408639ebf7e57993139f39a518e0d4
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
11 years agoAdd tests for copying QQuickChangeSets and debug output.
Andrew den Exter [Thu, 12 Jul 2012 04:31:50 +0000 (14:31 +1000)]
Add tests for copying QQuickChangeSets and debug output.

Change-Id: I4367f9d15e216f48116a7652c8fd064c706c9d35
Reviewed-by: Bea Lam <bea.lam@nokia.com>
11 years agoRestore QML/C++ extensions tutorial and fix plugin docs and examples
Bea Lam [Fri, 3 Aug 2012 06:55:25 +0000 (16:55 +1000)]
Restore QML/C++ extensions tutorial and fix plugin docs and examples

This restores the "Writing QML Extensions with C++" tutorial that
was removed during the recent QML doc restructure.

This also updates outdated docs in "Creating C++ Plugins for QML"
that referred to the use of Q_EXPORT_PLUGIN2() and such as the
process for writing QML plugins in Qt 5 has changed.

Note the plugins.json line was removed from
examples/qml/cppextensions/plugins/plugins.pro since this json file
was removed in a previous commit, as plugins no longer require the
empty json file.

Change-Id: I795d6faf6a741466a952feb8e15b028ec3d52b69
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
11 years agoUpdate porting guide for positioner handling of item opacity
Bea Lam [Fri, 3 Aug 2012 06:13:08 +0000 (16:13 +1000)]
Update porting guide for positioner handling of item opacity

Also moved some items from the release notes that are more
appropriate for the porting guide.

Change-Id: I0abe4dd5e74ac5505e1210bb330cc55af9e657da
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
11 years agoMinor update for release notes
Bea Lam [Fri, 3 Aug 2012 07:48:31 +0000 (17:48 +1000)]
Minor update for release notes

Change-Id: Ia474f5136fd8e22aad948abf0c3e1ac44290aa41
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
11 years agoMouseArea doc improvements
Bea Lam [Mon, 6 Aug 2012 03:28:09 +0000 (13:28 +1000)]
MouseArea doc improvements

Add example for propagateComposedEvents, and shorten the description of
this property in the main type docs as it's discussed in detail in the
property docs.

Change-Id: I6bc0acd537184c9dd8b5a22bcbc3fd044e10a2cd
Reviewed-by: Martin Jones <martin.jones@nokia.com>
11 years agoRename QQuickShaderEffect culling -> cullMode
Bea Lam [Mon, 6 Aug 2012 04:27:02 +0000 (14:27 +1000)]
Rename QQuickShaderEffect culling -> cullMode

Is documented as cullMode; I assume it should be named as such

Change-Id: I7e98bab5636a011d6548ebd897d2f89b2dcbf89d
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
11 years agoProperly check for ability to use GL_REPEAT with npot textures
Sean Harmer [Mon, 6 Aug 2012 10:04:35 +0000 (11:04 +0100)]
Properly check for ability to use GL_REPEAT with npot textures

Change-Id: I8dcc1c3f1d6959eef35a45f920bb37c08100a510
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
11 years agoFixes a crash in QQuickImageParticle
Berthold Krevert [Fri, 3 Aug 2012 14:56:53 +0000 (16:56 +0200)]
Fixes a crash in QQuickImageParticle

Fixes this bug: If the property source is set to an empty string or not set at all, the application crashes due to a missing pointer check.

Change-Id: I8c2a2ba738ceda573e655221fde37012f6bf3053
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
11 years agoFix pasting with the middle button in TextInput and TextEdit.
Andrew den Exter [Fri, 3 Aug 2012 06:50:24 +0000 (16:50 +1000)]
Fix pasting with the middle button in TextInput and TextEdit.

Neither item accepted the middle button which prevented the mouse events
ever reaching them.

Change-Id: Ia8f693099df4d6c248976453d554fef96d1d3b33
Reviewed-by: Martin Jones <martin.jones@nokia.com>
11 years agoAdd tests for copy and paste using keyboard shortcuts.
Andrew den Exter [Tue, 31 Jul 2012 06:25:16 +0000 (16:25 +1000)]
Add tests for copy and paste using keyboard shortcuts.

Fixes TextInput.cut() removing text while read only.

Change-Id: I03cd44d381be9d53f71ba168b8be7971ab0bbad7
Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
11 years agoDon't use compatibility headers
Paul Olav Tvete [Fri, 3 Aug 2012 11:48:46 +0000 (13:48 +0200)]
Don't use compatibility headers

Cleaning up after the QWindowSystemInterface header change.

Change-Id: Icc2df3cfd441bf6b113602f17d9b843fbc8c75ba
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
11 years agodoc: expanded Qt Quick internationalization guide
Gary Aish [Tue, 31 Jul 2012 08:08:29 +0000 (11:08 +0300)]
doc: expanded Qt Quick internationalization guide

Change-Id: I246fb252f6fca046a84fc689cea4334438d669de
Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
11 years agoDoc: QQuickMouseArea::acceptedButtons() accepts ALL MouseButtons
stockton [Thu, 2 Aug 2012 05:00:10 +0000 (22:00 -0700)]
Doc: QQuickMouseArea::acceptedButtons() accepts ALL MouseButtons

setAcceptedButtons() can make a MouseArea respond to any/all of
the Qt::MouseButtons defined in Qt5. (27 possible buttons,
not just Qt::LeftButton | Qt::RightButton | Qt::MiddleButton)

Task-number: QTBUG-26735

Change-Id: Ib48e5b02eb64c65050b9020b99d917e472328a30
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
11 years agoAdd specifics of attached property syntax
Bea Lam [Fri, 3 Aug 2012 07:31:53 +0000 (17:31 +1000)]
Add specifics of attached property syntax

Change-Id: Ia5f40e3d65ed8af2f9a14e3f44a1d41160ddf143
Reviewed-by: Bea Lam <bea.lam@nokia.com>
11 years agoDocument that add transitions should not animate item height
Bea Lam [Fri, 3 Aug 2012 07:18:57 +0000 (17:18 +1000)]
Document that add transitions should not animate item height

Change-Id: I4941e96e9ea96dfe364b9b95a00372d94695c7a3
Reviewed-by: Bea Lam <bea.lam@nokia.com>
11 years agoParticle doc fixes
Bea Lam [Fri, 3 Aug 2012 05:56:48 +0000 (15:56 +1000)]
Particle doc fixes

Change-Id: I65e8ecdedde6d0faec8b8d61e320df73100faf2c
Reviewed-by: Bea Lam <bea.lam@nokia.com>
11 years agoFix various broken links in documentation
Bea Lam [Thu, 2 Aug 2012 03:06:09 +0000 (13:06 +1000)]
Fix various broken links in documentation

Change-Id: I9e2dac37d18e3ca62e4a92be25e5c2e60ffeba00
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
11 years agoFix docs for FormatType enum
Bea Lam [Thu, 2 Aug 2012 01:18:41 +0000 (11:18 +1000)]
Fix docs for FormatType enum

Enums can't be documented as a separate type in QML documentation, so
move the enum docs into the class docs so it can be linked to from the
methods.

Change-Id: I22599ebc9e183d034d2d56cdac629d30aacf64ea
Reviewed-by: Martin Jones <martin.jones@nokia.com>
11 years agoRefactor and document QQuickChangeSet.
Andrew den Exter [Wed, 11 Jul 2012 03:30:38 +0000 (13:30 +1000)]
Refactor and document QQuickChangeSet.

Store an offset variable for moves so that an insert can be split
without the need to also split the corresponding remove, simplifying the
logic involved somewhat.

Change-Id: I1df19d431a04361a75e107bc4d149cbb80cd791d
Reviewed-by: Bea Lam <bea.lam@nokia.com>
11 years agoMake QQmlScriptString opaque.
Michael Brasser [Wed, 11 Jul 2012 03:01:33 +0000 (13:01 +1000)]
Make QQmlScriptString opaque.

Allow for future optimization by encapsulating the
raw script data.

Change-Id: I1863103e8e6d74ede60593cabb240e16f2ae657e
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
11 years agoDoc: fix typo in qtquick.qdocconf
Casper van Donderen [Thu, 2 Aug 2012 06:32:22 +0000 (08:32 +0200)]
Doc: fix typo in qtquick.qdocconf

Change-Id: I0ea367eb4caaf9dd9612150f37f6f1e750dc62cd
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
11 years agoParticles module doc fixes
Bea Lam [Tue, 31 Jul 2012 00:00:27 +0000 (10:00 +1000)]
Particles module doc fixes

Fixing some uses of qdoc commands and other minor fixes

Change-Id: I965f715ad8d7833c5a7b830d644c79ad51735da5
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
11 years agoMove QtQuick.Window module docs
Bea Lam [Wed, 1 Aug 2012 00:14:34 +0000 (10:14 +1000)]
Move QtQuick.Window module docs

Doesn't seem to get picked up by qdoc if the module docs reside
under quick/.

Change-Id: Ie27e85ee422d2259ffcb23d05ceb6fbbe7d22283
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
11 years agoUse \b instead of \bold
Bea Lam [Wed, 1 Aug 2012 04:03:49 +0000 (14:03 +1000)]
Use \b instead of \bold

Change-Id: Ica77b78b113321f962066f1edabd34bf21d38910
Reviewed-by: Bea Lam <bea.lam@nokia.com>
11 years agoAdd missing types for canvas related properties
Bea Lam [Wed, 1 Aug 2012 04:13:53 +0000 (14:13 +1000)]
Add missing types for canvas related properties

Change-Id: I208c5889be2768673637882e58f43f43ed1f28d9
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
11 years agoMark QQmlFile \internal
Bea Lam [Wed, 1 Aug 2012 04:15:13 +0000 (14:15 +1000)]
Mark QQmlFile \internal

Change-Id: Ia323e76f5922ef5c539243e2f834fbc9065451e6
Reviewed-by: Martin Jones <martin.jones@nokia.com>
11 years agoThese docs should use \ingroup not \group
Bea Lam [Wed, 1 Aug 2012 04:52:20 +0000 (14:52 +1000)]
These docs should use \ingroup not \group

\group generates a page with a set of links for a group, whereas \ingroup
declares that a page belongs to a group.

Change-Id: I3922ea0037d20a93a2c061d9f85ee0a9a83a80df
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
11 years agoUpdate docs now that all basic types can also be property types
Bea Lam [Thu, 2 Aug 2012 00:58:07 +0000 (10:58 +1000)]
Update docs now that all basic types can also be property types

Change-Id: I9f90627dc3f83e64e6d1d7b2937fdf5653a063f3
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
11 years agoSkip failing test
Bea Lam [Thu, 2 Aug 2012 03:40:44 +0000 (13:40 +1000)]
Skip failing test

tst_qqmlxmlhttprequest::stateChangeCallingContext() sometimes fails
on Windows.

Change-Id: Ib755c614e23587e6ea216da5c9108100a0f05d39
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
11 years agoVisual coordinates documentation
Alan Alpert [Wed, 25 Jul 2012 04:26:11 +0000 (14:26 +1000)]
Visual coordinates documentation

Task-number: QTBUG-26367
Change-Id: I4a782118e96aecfaf7cfa6921afcb6dd1f86d665
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
11 years agoMinor restructuring of application developer resources
Chris Adams [Tue, 31 Jul 2012 06:28:59 +0000 (16:28 +1000)]
Minor restructuring of application developer resources

Move the QtQml/QtQuick overviews below the quickstart / usecases
sections.  Merge the Important Topics and Debugging And Testing
sections into a single Advanced Topics section.  Modify some of the
formatting used to improve the consistency of the page.

Change-Id: Iab0b077130a763951a2967e725c2ef8ec2937ae8
Reviewed-by: Bea Lam <bea.lam@nokia.com>
11 years agoAdd tests for writing to model role properties.
Andrew den Exter [Wed, 1 Aug 2012 04:06:52 +0000 (14:06 +1000)]
Add tests for writing to model role properties.

Change-Id: I91375e9caecc130fb3a86f5a48d19e000fa6fcac
Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
11 years agoTest the VisualDataModel hasModelChildren property
Andrew den Exter [Wed, 1 Aug 2012 02:19:06 +0000 (12:19 +1000)]
Test the VisualDataModel hasModelChildren property

Change-Id: I9ea71ca5c7d6a0f161cc92583c187d591d26826a
Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
11 years agoAdd tests for VisualDataModel watched roles.
Andrew den Exter [Wed, 1 Aug 2012 00:23:38 +0000 (10:23 +1000)]
Add tests for VisualDataModel watched roles.

Change-Id: Idc84d0f833fe2ec4ed29bbda62def17ec20a3a8b
Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
11 years agoFix handling of changes to the root index of a VisualDataModel.
Andrew den Exter [Fri, 27 Jul 2012 02:33:27 +0000 (12:33 +1000)]
Fix handling of changes to the root index of a VisualDataModel.

Store the root index as a QPersistentModelIndex so the index remains
valid as the model changes, and in the case the root index is
removed from the model invalidate the contents of the VisualDataModel
until a new root index or model is set.

Change-Id: I1cbc27f2068f99a02ff3d43373905dec7e35e900
Reviewed-by: Martin Jones <martin.jones@nokia.com>
11 years agoSet the Qt API level to compatibility mode in all tests.
Thiago Macieira [Wed, 1 Aug 2012 12:27:05 +0000 (14:27 +0200)]
Set the Qt API level to compatibility mode in all tests.

Qt 5.0 beta requires changing the default to the 5.0 API, disabling
the deprecated code. However, tests should test (and often do) the
compatibility API too, so turn it back on.

Task-number: QTBUG-25053
Change-Id: I6988c2360e9d88916311374a0c910bfc5b607439
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
11 years agoAdd includes for QWindowSystemInterface
Paul Olav Tvete [Fri, 27 Jul 2012 14:20:26 +0000 (16:20 +0200)]
Add includes for QWindowSystemInterface

QWindowsystemInterface will no longer be a public class

Change-Id: Ibd815d377cbd553e8c3e99e99b337a9854647001
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
11 years agoDocument readonly property syntax
Bea Lam [Mon, 30 Jul 2012 08:01:01 +0000 (18:01 +1000)]
Document readonly property syntax

Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Change-Id: Ibaf68b39526824098aa67f7d1fdce6d12e3b3111
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
11 years agoDocument qmlAttachedPropertiesObject()
Bea Lam [Wed, 18 Jul 2012 06:14:45 +0000 (16:14 +1000)]
Document qmlAttachedPropertiesObject()

This is discussed in the documentation on writing QML extensions from
C++ but is not actually documented in the list of qml* functions.

Change-Id: Id24be88dc3fa6d54cc5ee29e3da1686ea2732b39
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
11 years agoSkip tst_qquickfolderlistmodel::changeDrive()
Bea Lam [Wed, 1 Aug 2012 03:26:13 +0000 (13:26 +1000)]
Skip tst_qquickfolderlistmodel::changeDrive()

Fails on Windows.

Task-number: QTBUG-26728
Change-Id: I81c4b13940fe68d780db9d43a5a11edf8f12e99a
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
11 years agoRefactor context2d thread logic
Charles Yin [Tue, 5 Jun 2012 21:09:07 +0000 (07:09 +1000)]
Refactor context2d thread logic

1. Use QQuickContext2DRenderThread for Threaded rendering
2. Make FBO target works with all render strategies
3. Remove some unnessary locks, call texture methods by invoking meta calls
4. Run existing tests with all render targets and strategies (except Cooperative)

Change-Id: I0db5c91d848b86bcc1536c30d7a5804b66a817f1
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
11 years agoFix folder list model when changing drives on Windows.
Glenn Watson [Thu, 26 Jul 2012 05:00:28 +0000 (15:00 +1000)]
Fix folder list model when changing drives on Windows.

The folder list model implementation drops drive letters when
changing folder on Windows. Fix this and add a Windows specific
test case.

Task-number: QTBUG-26620
Change-Id: If58551ba01b56343ebf44512620207e49d83ba09
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
11 years agoVisual hierarchy documentation
Alan Alpert [Wed, 25 Jul 2012 05:39:35 +0000 (15:39 +1000)]
Visual hierarchy documentation

Task-number: QTBUG-26367
Change-Id: I4a782118e96aecfaf7cfa6921afcb6dd1f86d66b
Reviewed-by: Bea Lam <bea.lam@nokia.com>
11 years agoDocs - fix referenced class names
Bea Lam [Mon, 30 Jul 2012 05:24:31 +0000 (15:24 +1000)]
Docs - fix referenced class names

Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
Change-Id: If29505d57fbf4c111d3250daa12d5f0e706dfdc6
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
11 years agoReset Styled/PlainText specific state when switching between formats.
Andrew den Exter [Tue, 31 Jul 2012 02:54:42 +0000 (12:54 +1000)]
Reset Styled/PlainText specific state when switching between formats.

Fixes markup being displayed when switching from a multilength string
to styled text and formatting of elided text when switching from
elided styled text to elided plain text.

Change-Id: Id1e1834d81cb6142d92433a8bc571e05d226b7b3
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
11 years agoImplement strict mode for qmldir modules
Matthew Vogt [Wed, 25 Jul 2012 06:59:17 +0000 (16:59 +1000)]
Implement strict mode for qmldir modules

Allow a module's qmldir to contain a module directive, which when
present specifies 'strict mode' import processing.  In strict mode,
type registrations are only permitted into the namespace identified
in the qmldir file's module directive.  In addition, any type
registrations to that namespace originating from other modules are
treated as error conditions.

Task-number: QTBUG-26551

Change-Id: I081bde2d3b83d3f28524440177fb2cd1ccee34ad
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
11 years agoSome autotests which failed on OSX don't fail anymore; others do
Bea Lam [Mon, 30 Jul 2012 00:19:34 +0000 (10:19 +1000)]
Some autotests which failed on OSX don't fail anymore; others do

Seems to be better after the parallel touch/mouse propagation.

Change-Id: I7336a451f18469d819a6105d58ae6dbb029a0c2c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
11 years agoDoc: Changed \qmlclass to \qmltype and added \instantiates.
Jerome Pasion [Fri, 27 Jul 2012 15:18:12 +0000 (17:18 +0200)]
Doc: Changed \qmlclass to \qmltype and added \instantiates.

-To simplify QDoc, \qmlclass is now \qmltype.
-'\instantiates <C+++ class>' is for the types that are defined in C++.

Change-Id: I29242d33daf7b972d8b86a356b9689638866b950
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Bea Lam <bea.lam@nokia.com>
Reviewed-by: Martin Smith <martin.smith@nokia.com>
11 years agoImprove QML basic types documentation
Chris Adams [Thu, 26 Jul 2012 05:45:45 +0000 (15:45 +1000)]
Improve QML basic types documentation

Basic types are provided either by the language (int, string, bool,
real, double, date, url, var, variant) or by modules (value types).
In 5.1 we would like modules to be able to provide more basic types,
and thus a cleaner separation of the documentation makes sense.

This patch also improves linking of the term QtQml so that a clear
distinction is made between the QtQml QML module and the QtQml C++
Qt Module (the QtQml QML module links now point to the QtQml type
reference page).

Change-Id: Ibe3ad33e4616c5f29ea38dadc27e13938aedb9d7
Reviewed-by: Bea Lam <bea.lam@nokia.com>
11 years agoqmlscene: fixed dependency on QtWidgets
Rohan McGovern [Mon, 30 Jul 2012 00:09:13 +0000 (10:09 +1000)]
qmlscene: fixed dependency on QtWidgets

Don't unnecessarily refer to QApplication for installTranslator();
this is a static member of QCoreApplication.

Change-Id: I7b0e0e30abe1f3a5c114136f1107de3fd7dbc815
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
11 years agoAdd tests for Text(*) default property values and notifiers.
Andrew den Exter [Tue, 24 Jul 2012 05:54:28 +0000 (15:54 +1000)]
Add tests for Text(*) default property values and notifiers.

Change-Id: I64bfe285ab4ddad53a4d323ca93b15ea0426ed51
Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
11 years agoAdd tests for an object instance as model data.
Andrew den Exter [Tue, 24 Jul 2012 04:38:26 +0000 (14:38 +1000)]
Add tests for an object instance as model data.

Change-Id: I08137b24ff97b6c76edcf683e987228cf66d8816
Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
11 years agoDelete created objects in tests and fix warnings
Bea Lam [Mon, 30 Jul 2012 00:02:10 +0000 (10:02 +1000)]
Delete created objects in tests and fix warnings

Change-Id: I593fc9f4506e849852e56fbc7c40a3481c601806
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
11 years agoRemove default parameter from protected QmlPropertyMap CT.
Friedemann Kleint [Fri, 27 Jul 2012 09:33:47 +0000 (11:33 +0200)]
Remove default parameter from protected QmlPropertyMap CT.

Make public constructor explicit.
This fixes QtLocation compilation (declarativeplaces defaulted
to the protected CT).

Change-Id: I8b32d7624b6ba770f6d646c227a0bfd37e501ee5
Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
11 years agoStabilize tst_qquickloader test case
Matthew Vogt [Mon, 30 Jul 2012 01:10:28 +0000 (11:10 +1000)]
Stabilize tst_qquickloader test case

Ensure cases are not affected by timer events of incubation controllers
created in previous cases.

Change-Id: Ia633ed142242d000de5f497896a685ca2f26e143
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
11 years agoClarify use of enumeration type from QML code
Bea Lam [Fri, 27 Jul 2012 07:03:44 +0000 (17:03 +1000)]
Clarify use of enumeration type from QML code

Change-Id: I5aea6ec8c4daada284bc7881bbc3379e5ab61b94
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
11 years agoRemove unused notify signal.
Andrew den Exter [Fri, 27 Jul 2012 05:07:16 +0000 (15:07 +1000)]
Remove unused notify signal.

With changes to how VisualDataModel attached objects are created the
model property is now always populated on construction and the
modelChanged signal is unnecessary.

Change-Id: Id02c4115e19900a2937031ca70b7cba34ff13d3a
Reviewed-by: Martin Jones <martin.jones@nokia.com>
11 years agoPixmap loader adds images to unreferenced list when cache: false
Martin Jones [Fri, 27 Jul 2012 03:38:43 +0000 (13:38 +1000)]
Pixmap loader adds images to unreferenced list when cache: false

Don't add uncached images to the unreferenced list, since
they cannot be reused later as they are not in the cache.

Additionally, we currently search for images in the cache, even if we
set cache: false. Setting cache false should not put images in the cache
and should not use images that are in the cache.

Task-number: QTBUG-26676
Change-Id: Ib7eb42199ae6ae6154b696c83ad1dd959e0f208f
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
11 years agoUpdate whatsnew documentation with value-type improvements
Chris Adams [Thu, 26 Jul 2012 00:51:50 +0000 (10:51 +1000)]
Update whatsnew documentation with value-type improvements

Value types are now supported as property types.  QtQuick provides
several new value types.  Subproperty modification write-back
semantics have been fixed for variant properties.

Change-Id: Ic47a8401178e6f8bbd5037b6929d7afd5e3cffe6
Reviewed-by: Bea Lam <bea.lam@nokia.com>
11 years agoAllow access to signals and slots in QQmlPropertyMap inheritors
Matthew Vogt [Thu, 26 Jul 2012 04:15:49 +0000 (14:15 +1000)]
Allow access to signals and slots in QQmlPropertyMap inheritors

Allow inheritors of QQmlPropertyMap to pass the static meta object
information needed to support their signals and slots.  If the correct
pointer is not provided to the constructor, it is not accessible via
the virtual metaObject() function during construction.

Task-number: QTBUG-26400
Change-Id: Ide8c6d3568e4abd4c48e0aa60e6fa05a9c2a11cf
Reviewed-by: Martin Jones <martin.jones@nokia.com>
11 years agoFix QML import paths in Qt resources.
Aaron McCarthy [Mon, 23 Jul 2012 00:59:30 +0000 (10:59 +1000)]
Fix QML import paths in Qt resources.

Allow adding qrc: urls as import paths.
Store an import path of the form :/import/path as qrc:/import/path
which is expected by other parts of the code.

Update documentation for QQmlEngine::addImportPath() to explicitly
state what types of paths are supported.

Add auto tests to check that importing a module from a Qt resource
works.

Change-Id: If0e75c75078a608b20d7a5c4080bccf6241e97f6
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
11 years agoAdd SnapPosition mode to positionViewAtIndex() in List/GridView.
Martin Jones [Thu, 26 Jul 2012 03:14:50 +0000 (13:14 +1000)]
Add SnapPosition mode to positionViewAtIndex() in List/GridView.

This allows the view to be positioned on a snap boundary, which is
generally what is wanted when strict highlight mode s set or snapping
is enabled.

Task-number: QTBUG-26605
Change-Id: I6288dc8be4ff16c412b56ab449b6a9fb7b7ea889
Reviewed-by: Bea Lam <bea.lam@nokia.com>
11 years agoRemove obsolete Q_WS_QWS.
Stephen Kelly [Thu, 26 Jul 2012 07:53:03 +0000 (09:53 +0200)]
Remove obsolete Q_WS_QWS.

Change-Id: I41e1440ff64eafc8729701aea11292f12e3bbe8c
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
11 years agoRemove work-around for Q_DECLARE_METATYPE(QFileInfo) being added to QtCore
Marc Mutz [Tue, 24 Jul 2012 15:58:57 +0000 (17:58 +0200)]
Remove work-around for Q_DECLARE_METATYPE(QFileInfo) being added to QtCore

Change-Id: Ibf1f9a451164982bcd50195b210c5b59e684937e
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
11 years agoRemove QSKIP from snapOneItem() test
Bea Lam [Thu, 26 Jul 2012 06:51:21 +0000 (16:51 +1000)]
Remove QSKIP from snapOneItem() test

Past test failures are likely to have been caused by mouse events
passing over from previous tests and causing a double click rather
than a press for a flick. This should pass now as
QQuickViewTestUtil::flick() now calls QTest::mouseMove() instead of
sending MouseMove events to the window.

Task-number: QTBUG-24338
Change-Id: I68f7f3f91d189ed3ead01c8646570c39ba86f1d4
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
11 years agoFix resolution of cursor when items are overlapping.
Andrew den Exter [Wed, 25 Jul 2012 04:04:47 +0000 (14:04 +1000)]
Fix resolution of cursor when items are overlapping.

If MouseArea with cursorShapes are overlapping then cursor shape
of the foremost item under the mouse cursor should be shown, but because
the hover events are delivered to the foremost items first the opposite
is occuring.  This makes QQuickWindow responsible for correctly setting
its own cursor instead of relying on items to work it out amongst
themselves.

Change-Id: Iedf144c583dfa3d1ff441e19db9601b5e171902a
Reviewed-by: Martin Jones <martin.jones@nokia.com>
11 years agoWork around Q_DECLARE_METATYPE(QFileInfo) being added to QtCore
Marc Mutz [Tue, 24 Jul 2012 15:57:36 +0000 (17:57 +0200)]
Work around Q_DECLARE_METATYPE(QFileInfo) being added to QtCore

Change-Id: Ic83e5fdaa7ef289f40cbeb4633a75d93d38c0bdb
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
11 years agoRevise the restructured "Integrating QML and C++" docs
Bea Lam [Mon, 23 Jul 2012 07:45:40 +0000 (17:45 +1000)]
Revise the restructured "Integrating QML and C++" docs

These docs were yet to be cleaned up following the recent doc
restructure. This changes most of the the content in these sections
and includes some new docs and examples.

Currently all the code snippets are included inline. In a later patch,
these should be moved into the snippets/ directories and be included
using the \snippet command instead. Alternatively they can be moved
into examples/ to replace the BirthdayParty examples which are no
longer referenced in these docs as of this patch.

Task-number: QTBUG-26381

Change-Id: I94e3654e61476fad11fe81042d1bbe94fc649d06
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
11 years agoEnsure params listed after unnamed params are available in QML.
Glenn Watson [Tue, 24 Jul 2012 23:48:42 +0000 (09:48 +1000)]
Ensure params listed after unnamed params are available in QML.

If a parameter in a bound signal had no name, it was excluded from
the metaobject created by the bound signal expression. Change this
so that unnamed parameters are still added (with an anonymous
name). This means that subsequent parameters can be accessed from QML.

Task-number: QTBUG-24481
Change-Id: Ia3403fb3bdc3da0c7e58baf7e891b67ed413bebd
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
11 years agoAdd waitForRendering() function for qmltest
Charles Yin [Tue, 12 Jun 2012 05:38:52 +0000 (15:38 +1000)]
Add waitForRendering() function for qmltest

Change-Id: I6357412d84fdb4a8b6bd8603baba7d10a2bcc245
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
11 years agoAdd tests for QQuickItem::childAt and antialiasing.
Andrew den Exter [Tue, 24 Jul 2012 03:40:55 +0000 (13:40 +1000)]
Add tests for QQuickItem::childAt and antialiasing.

Change-Id: I5dc26eaf27c201be05147c7bab4d6f0b0c926aed
Reviewed-by: Martin Jones <martin.jones@nokia.com>
11 years agoFix inconsistent playing / paused property setting and signals
Damian Jansen [Thu, 19 Jul 2012 04:09:47 +0000 (14:09 +1000)]
Fix inconsistent playing / paused property setting  and signals

Playing should only indicate false if it has been set as such
in code, or in the event of a valid image but non-movie being
used.
Noted the edge case in documentation.
Signals were not being emitted for playing/paused in the cases
where an image was not loaded. Paused property was also being
incorrectly assigned, which supressed pause behavior.

Task-number: QTBUG-26478
Change-Id: I1aaab9b7c495811114b30b491a900804a75d590f
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
11 years agoEmpty JSON files are not needed for the plugin system
Alan Alpert [Tue, 24 Jul 2012 10:05:07 +0000 (20:05 +1000)]
Empty JSON files are not needed for the plugin system

Change-Id: I8df57ed1ced8128723d790c30c00ccaba0a2787d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
11 years agoRemove QListModelInterface.
Andrew den Exter [Tue, 10 Jul 2012 07:01:52 +0000 (17:01 +1000)]
Remove QListModelInterface.

Implement ListModel and XmlListModel using QAbstractListModel
instead.

Task-number: QTBUG-15728

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