profile/ivi/qtdeclarative.git
12 years agoIsolate unstable test
Bea Lam [Mon, 25 Jun 2012 06:47:38 +0000 (16:47 +1000)]
Isolate unstable test

Change-Id: Id534dc7ff7146799bdb989d8bcf56ca4c0fbeffa
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
12 years agoFix crash in tst_qquicklistview.
Andrew den Exter [Tue, 26 Jun 2012 00:00:06 +0000 (10:00 +1000)]
Fix crash in tst_qquicklistview.

Destroy the shared canvas before QGuiApplication is destroyed.

Task-number: QTBUG-26244
Change-Id: I9aa59bae5314f51c84a61821af2fb3c7a1c77941
Reviewed-by: Bea Lam <bea.lam@nokia.com>
12 years agoAdd warning if defining a ListModel with no roles.
Glenn Watson [Mon, 25 Jun 2012 23:47:43 +0000 (09:47 +1000)]
Add warning if defining a ListModel with no roles.

When static ListElement types are declared, the role names are
inferred from them at compile time. If they are all empty, it's
not possible to add roles to the model, so warn the user of this
case.

Task-number: QTBUG-21438
Change-Id: Ib4ac30e160c44a5a57ebd1c49fccc2b3db5f0977
Reviewed-by: Bea Lam <bea.lam@nokia.com>
12 years agoRemove default allocation size for PODVector.
Glenn Watson [Tue, 26 Jun 2012 00:01:39 +0000 (10:01 +1000)]
Remove default allocation size for PODVector.

The default increment was 1024, which can waste memory. Remove
the default value so that clients must explicitly set the allocation
increment.

The original bug is no longer relevant, as capture properties are
now stored in a linked list rather than a POD vector.

Task-number: QTBUG-20285
Change-Id: Iadb0b40af19fed36ccc05249461acc7e870dcbc3
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
12 years agoRemove some unnecessary indirection.
Robin Burchell [Mon, 18 Jun 2012 15:31:06 +0000 (17:31 +0200)]
Remove some unnecessary indirection.

There's no need to heap allocate our QQuickView, and there's no need to have a
seperate pointer to QWindow when we can just use the QQuickView directly.

Change-Id: Ia2bc83c9dc83d1df1ec793836793f752d67e9415
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
12 years agoAdd mouse cursor shapes to MouseArea
Frederik Gladhorn [Sat, 23 Jun 2012 09:29:59 +0000 (11:29 +0200)]
Add mouse cursor shapes to MouseArea

This adds a new property that uses the enum
from the Qt namespace to allow setting of
custom cursor shapes for mouse areas.

Change-Id: I4d1ac6339b69dc9ea7855a8b8b6aa9276c71a90d
Reviewed-by: Jeremy Katz <jeremy.katz@nokia.com>
12 years agoDoc: Use correct style and modules for doc build.
Casper van Donderen [Fri, 22 Jun 2012 08:51:44 +0000 (10:51 +0200)]
Doc: Use correct style and modules for doc build.

This change makes the "make docs" command use the correct style. Be aware
that the "global" qdocconfs need to be in the QT_INSTALL_DOCS location
before running "make docs", which effectively means that "make install"
needs to be run in qtbase when doing a prefix build.

Change-Id: Ib4635af0ad45717407a163968d629647898074dc
Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
12 years agoDoc: Use the module "make docs" and rename qtquick "make docs".
Casper van Donderen [Fri, 22 Jun 2012 08:30:26 +0000 (10:30 +0200)]
Doc: Use the module "make docs" and rename qtquick "make docs".

The qtquick "make docs" is now renamed to "make qtquick_docs" and when
you use "make docs" you get the automatic make command generated by qmake
for modularized documentation.

Change-Id: I23c0e52fa9c235f76df430f992201723ddcfbbea
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
12 years agoRemove superfluous statusChanged signal
Damian Jansen [Thu, 14 Jun 2012 06:19:02 +0000 (16:19 +1000)]
Remove superfluous statusChanged signal

If the file name is empty, or is a local file, statusChanged would be
emitted twice.

Task-number: QTBUG-26155
Change-Id: Id341d1c76d45e3fca19260293f632b0b51a34e90
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
12 years agoRevert "Remove properties related to highlight speed"
Bea Lam [Mon, 25 Jun 2012 01:30:01 +0000 (11:30 +1000)]
Revert "Remove properties related to highlight speed"

This reverts commit 18fb5506d524dbe380d5bf636c74c93fb85cbc31.

Without these properties there's no way to set a constant
movement speed.

Change-Id: I49cd648846f801eb479ecce8cde09ff49ea11736
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoDon't Assert
Alan Alpert [Tue, 8 May 2012 06:48:30 +0000 (16:48 +1000)]
Don't Assert

It's better to have run-time errors in certain uses of the property than
to assert when trying to access it.

Change-Id: I913eea3fe275ee41358ac8d56bd597faf8e613ad
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
12 years agoDelete canvas created in test
Bea Lam [Mon, 25 Jun 2012 06:16:13 +0000 (16:16 +1000)]
Delete canvas created in test

This was causing a crash on exit.

Task-number: QTBUG-23605

Change-Id: I96a38f383a180f8aaf5177ad6d7183f9b0b5e85a
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
12 years agoFix clicking on links in aligned or elided Text.
Andrew den Exter [Tue, 19 Jun 2012 01:30:59 +0000 (11:30 +1000)]
Fix clicking on links in aligned or elided Text.

Adjust the mouse position to compensate for any alignment offsets
and test the elided text layout for anchors if none is found in
the normal layout.

Change-Id: Idfda3f7e372d0f2d6c1b7bb5f22d7015d52e8239
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
12 years agoLink back to the particles module page from the overview page.
Alan Alpert [Mon, 25 Jun 2012 03:54:12 +0000 (13:54 +1000)]
Link back to the particles module page from the overview page.

Task-number: QTBUG-25345

Change-Id: Id913bd1c1428b351bf03156891adaba5252ded5b
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
12 years agoDelay custom emitter processing
Alan Alpert [Thu, 7 Jun 2012 03:23:56 +0000 (13:23 +1000)]
Delay custom emitter processing

It now happens after ParticlePainter intialization, so that custom
emitters can affect painter specific parameters like color.

Change-Id: I9a732713108580e57130588c175c69aa854c5b2f
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoCorrectly resolve qrc:/ URLs in type loading
Matthew Vogt [Fri, 22 Jun 2012 06:28:40 +0000 (16:28 +1000)]
Correctly resolve qrc:/ URLs in type loading

URLS specified with the qrc scheme do not use the 'authority'
part of the syntax, and therefore do not necessarily contain a
double slash immediately after the scheme.

Task-number: QTBUG-25937

Change-Id: I49156b463f11dbb38d6a01d30ea934b0a652c8e5
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoqmlRegisterRevision clashes with qmlRegisterUncreatableType
Martin Jones [Fri, 22 Jun 2012 06:56:27 +0000 (16:56 +1000)]
qmlRegisterRevision clashes with qmlRegisterUncreatableType

Add template<typename T, int metaObjectRevision>
qmlRegisterUncreatableType() in order to register an uncreatable type
for a particular revision.

Task-number: QTBUG-23278
Change-Id: Ic165e41c8176916929cf19eb9bf6eef4b5bee1eb
Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
12 years agoFix right aligned cursor position in TextInput with geometry changes
Pekka Vuorela [Wed, 13 Jun 2012 11:51:00 +0000 (14:51 +0300)]
Fix right aligned cursor position in TextInput with geometry changes

Updating the text layout cannot be omitted with NoWrap because line width
needs to be updated even with empty content.

Change-Id: Ia9b168d6cfe7680cc1c9e7fa641ce7528d2b6d5e
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
12 years agoDecode directory separators in source URLs
Matthew Vogt [Tue, 19 Jun 2012 00:24:01 +0000 (10:24 +1000)]
Decode directory separators in source URLs

URLs with encoded directory-separator characters are not correctly
processed by QUrl.

Task-number: QTBUG-25981
Change-Id: I78173ef44c4850774b56753335bea34db04c0735
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
12 years agoactiveWindow is deprecated, use focusWindow.
Thiago Macieira [Sun, 24 Jun 2012 22:11:00 +0000 (00:11 +0200)]
activeWindow is deprecated, use focusWindow.

Change-Id: I846d3121b7e17bcb07bc891e5a8ad9473439e5d9
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoMake qtdeclarative compile with QT_NO_DRAGANDDROP
Tasuku Suzuki [Wed, 20 Jun 2012 01:31:52 +0000 (10:31 +0900)]
Make qtdeclarative compile with QT_NO_DRAGANDDROP

Change-Id: Ie92455495979b065b574f013d95fac17739fa40e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Jeremy Katz <jeremy.katz@nokia.com>
12 years agoFix compilation with GCC 4.7 (C++11)
Thiago Macieira [Wed, 6 Jun 2012 17:17:42 +0000 (19:17 +0200)]
Fix compilation with GCC 4.7 (C++11)

The error was:
error: unable to find string literal operator ‘operator"" STR_PORT’

Change-Id: Id4b4e64e296ffc3624be15c20f74a964e6cd1087
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoFix crash when dragging items outside visible area.
Andrew den Exter [Thu, 14 Jun 2012 05:11:54 +0000 (15:11 +1000)]
Fix crash when dragging items outside visible area.

If asynchronous item creation finishes while the content area of a
ListView has been dragged full outside the visible area a full refill
is triggered which can overwrite the requested index and potentially
result in a single delegate item being assigned to multiple view items
and later being doubly released.  Only create the view item object in
the createItem function to prevent this from happening.

Secondly only reset the visible items if jumping outside the buffer
range rather than just the fill range to prevent churn when the list
only contains buffered items.

Task-number: QTBUG-26232

Change-Id: I5bce845898ef5f699f34afc268594ef38e01d6a3
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoFix build: include the necessary headers properly.
Thiago Macieira [Tue, 19 Jun 2012 10:12:32 +0000 (12:12 +0200)]
Fix build: include the necessary headers properly.

qstrcmp is defined in qbytearray.h

If QObject needs to be forward declared, then so does QMetaObject.

Change-Id: I9dd3ad59ce889cee04583ead27fa760d784e5b84
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoMake qmltest depend on gui-private
Girish Ramakrishnan [Fri, 22 Jun 2012 03:05:16 +0000 (05:05 +0200)]
Make qmltest depend on gui-private

QWindowSystemInterface will shortly be marked as QPA API.
(quicktestevent.cpp pulls in qtestkeyboard.h which uses that
class)

Change-Id: Id7bd03e8a97be6bf4677c8a326191b3df2675824
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoAdd gui-private to tests
Girish Ramakrishnan [Fri, 22 Jun 2012 07:45:53 +0000 (09:45 +0200)]
Add gui-private to tests

QWindowSystemInterface will be marked as QPA API.

Change-Id: Id174a24f8432219adf1425efe1eb59cf67d48bb9
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoPass the right signal index in visualadaptormodel proxy meta-object
Kent Hansen [Mon, 4 Jun 2012 14:10:34 +0000 (16:10 +0200)]
Pass the right signal index in visualadaptormodel proxy meta-object

For QMetaObject::activate(), the index must be relative to the
class's own signals (excluding non-signal methods).
For QMetaObjectBuilder, the notifier index must be relative to the
class's own methods.

Change-Id: I22f55d1fc55d56c997135dc78f51b710b37bb01a
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
12 years agoRemove insignificant_test from DropArea test.
Andrew den Exter [Fri, 22 Jun 2012 00:03:20 +0000 (10:03 +1000)]
Remove insignificant_test from DropArea test.

The test has not been failing on recent CI runs.

Task-number: QTBUG-24588
Change-Id: I9dd29bbf1a33d9fbf042693a0995dafd887c3064
Reviewed-by: Bea Lam <bea.lam@nokia.com>
12 years agoRemove the open and closeSofwareInputPanel functions.
Andrew den Exter [Fri, 22 Jun 2012 06:00:08 +0000 (16:00 +1000)]
Remove the open and closeSofwareInputPanel functions.

Functionality is provided by the global Qt.application.inputMethod
object.

Task-number: QTBUG-21449
Change-Id: I75c082bcbe44c8834ccaf966a3f9a09ab91ec290
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoRemove stale demos
Alan Alpert [Fri, 22 Jun 2012 01:51:37 +0000 (11:51 +1000)]
Remove stale demos

Focus for Qt5 is fewer, better demos.

Change-Id: Ia2b74ce4768034d8f225547ffbbc85ac5cb72845
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
12 years agoInstall examples to example hierarchy
root [Fri, 22 Jun 2012 02:48:32 +0000 (12:48 +1000)]
Install examples to example hierarchy

Some examples were installing to an old path of qtdeclarative/qtquick

Task-number QTBUG-26205
Change-Id: I6e1840b1f1a87e24c1728de1b7320d6738bd530e
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoRename Flickable x/yOrigin to originX/Y
Bea Lam [Fri, 22 Jun 2012 01:39:18 +0000 (11:39 +1000)]
Rename Flickable x/yOrigin to originX/Y

This is consistent with the naming of other x/y properties, e.g.
contentX/Y, relativeX/Y etc.

Change-Id: I5159f8e54a6fda6a1f83a563ea9db47c3b8af238
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoRemove properties related to highlight speed
Bea Lam [Wed, 20 Jun 2012 07:08:56 +0000 (17:08 +1000)]
Remove properties related to highlight speed

ListView should only have duration-type properties (i.e.
highlightMoveDuration and highlightResizeDuration) as it's unnecessary
to have both duration and speed properties for the highlight animation.
(PathView and GridView only have the duration-related properties.)

Change-Id: I1b94599e3e89afe6488ce2a882c2802354a859fe
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoAdd some tests for literal parsing
Martin Jones [Wed, 13 Jun 2012 03:40:21 +0000 (13:40 +1000)]
Add some tests for literal parsing

Change-Id: I3f3047cf27b1e5d230db0ed4154bac09e6adf087
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
12 years agoHandle enum values of -1 correctly.
Michael Brasser [Thu, 21 Jun 2012 23:23:26 +0000 (09:23 +1000)]
Handle enum values of -1 correctly.

This was already handled correctly most places; now the
remaining cases (using an enum in ListModel, and assigning
an enum to an integer property) should also work correctly.

Task-number: QTBUG-21679
Change-Id: Ibff13f0b94da94b18e2e3bae4aa6ba44e0fa944b
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
12 years agoClarify anchor error messages.
Michael Brasser [Fri, 22 Jun 2012 01:36:11 +0000 (11:36 +1000)]
Clarify anchor error messages.

Task-number: QTBUG-24625
Change-Id: Icff9fe16f053f7e79039ef31bb56cae00cdf49d1
Reviewed-by: Bea Lam <bea.lam@nokia.com>
12 years agoAdd tests for clicking and dragging with right and middle buttons.
Andrew den Exter [Thu, 21 Jun 2012 05:49:10 +0000 (15:49 +1000)]
Add tests for clicking and dragging with right and middle buttons.

Task-number: QTBUG-24461
Change-Id: I2c8b3455cb3aead5df7dfd85f65eb633a552b881
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoDon't shadow member variable with argument.
Andrew den Exter [Thu, 21 Jun 2012 07:01:14 +0000 (17:01 +1000)]
Don't shadow member variable with argument.

Function argument is being written to itself rather than the member
variable preventing the property from ever changing.

Task-number: QTBUG-26158
Change-Id: Id204a193300c62feeb007a2ea9df89cba5e1d513
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
12 years agoFix crash when selecting transformed text.
Andrew den Exter [Thu, 21 Jun 2012 00:07:56 +0000 (10:07 +1000)]
Fix crash when selecting transformed text.

QSGClipNode cannot be used directly, a sub-class or external provider
of geometry is required.

Task-number: QTBUG-26234
Change-Id: I0354ec17b619886b95f7994ad5af5c96e97397a0
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agodynamiclist example used different delegate height for anim and static
Martin Jones [Wed, 20 Jun 2012 05:57:49 +0000 (15:57 +1000)]
dynamiclist example used different delegate height for anim and static

so delegates added later weren't the same size as the original items.
Set a better value for both.

Task-number: QTBUG-26206
Change-Id: Ic9d32528eb43a77e23e3a619834da098f177b5d6
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
12 years agoFix snake demo.
Martin Jones [Tue, 19 Jun 2012 06:18:16 +0000 (16:18 +1000)]
Fix snake demo.

A surrounding Item {} appeared for no clear reason.

Task-number: QTBUG-26198
Change-Id: I1ddb7cc92c5ba977d85d3047c405a90cfe697a13
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoFix locale test on Linux and skip it on Windows.
Glenn Watson [Wed, 20 Jun 2012 02:57:43 +0000 (12:57 +1000)]
Fix locale test on Linux and skip it on Windows.

The timezone that V8 internally uses was not being updated at the
end of one test, causing failures in subsequent tests. This was
only showing up on Windows because the test was being skipped on
Linux due to a typo. Skip the test on Windows due to complexity
of changing the timezone (added comments in code with details).

Change-Id: I47c8542111e8ddfbdeff39815c50d98570b0c6c2
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
12 years agoSupport enum return types in Q_INVOKABLE functions.
Matthew Vogt [Mon, 18 Jun 2012 05:06:16 +0000 (15:06 +1000)]
Support enum return types in Q_INVOKABLE functions.

Handle enums correctly when used as the return type of a Q_INVOKABLE
function.

Task-number: QTBUG-23543
Change-Id: I14a506ffee08f5ba6aa0fdf27d6104a3ae5c48b3
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
12 years agoReport clashing qmldir entries for components and scripts
Matthew Vogt [Tue, 19 Jun 2012 02:57:57 +0000 (12:57 +1000)]
Report clashing qmldir entries for components and scripts

If a qmldir contains multiple lines that install the same versioned
property for a single component name or script qualifier, report an
error rather than silently suppress one entry.

Task-number: QTBUG-25834
Change-Id: I25d3a24102a5a4fa3d82f1d31d7e52505026fff7
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
12 years agoCreate new documentation structure
Chris Adams [Mon, 28 May 2012 07:12:56 +0000 (17:12 +1000)]
Create new documentation structure

The documentation currently has no clear separation between Qt QML
and Qt Quick.  With recent commits like:
6c8378eaf1edbbefe6aaa3672b0127816a004fd7
and
ab1e510121c8a679fdaca12ccd30e0f7ac12a26b
the separation between the language definition and implementation,
provided by Qt QML, and the standard library for the QML language,
provided by Qt Quick, is clear.

This commit creates a new documentation structure that is more
navigable and separates concepts into logical categories, with
clear separation between QtQML and QtQuick.  It also provides a more
generic QML Application Developer Resources page which contains links
to information for QML application developers.

Change-Id: Ia807ccfbfd24ffa0e1c7f0a51ed9d2ed3aa6a733
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoPut basic language types into QtQml import
Chris Adams [Wed, 23 May 2012 08:05:10 +0000 (18:05 +1000)]
Put basic language types into QtQml import

This import is automatically registered by the engine.
It provides basic language types (Component and QtObject).
Note that the QtQuick import still has these types registered into it,
so this commit doesn't break existing code.

Change-Id: I8ff190f057fc92969020cf8e896da1649ca3069b
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
12 years agoFix crash in QQuickPixmapData::release()
Chris Adams [Thu, 21 Jun 2012 07:21:07 +0000 (17:21 +1000)]
Fix crash in QQuickPixmapData::release()

Previously, if the reader was deleted (eg, via engine destruction)
the reply might be deleted without letting the associated
QQuickPixmapData know about it.  If that data was later released,
it would attempt to write to previously freed memory.

This commit ensures that the data's reply ptr is set to zero when
the reply is deleted by the reader dtor.  It also adds a comment to
the reply dtor to explain why it is important.

A unit test for this issue already exists:
tst_qquickpixmapcache::lockingCrash() run under valgrind.

Change-Id: Icd94528e1336db1c00b118b3f6d1222eef402c46
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoDisallow signal-handler-specification for non-signal methods
Chris Adams [Thu, 21 Jun 2012 06:02:38 +0000 (16:02 +1000)]
Disallow signal-handler-specification for non-signal methods

Previously, the code which checked whether a signal handler
specification was valid was incorrect, in that it only checked that a
method of the appropriate name existed (rather than specifically a
signal method).

This commit ensures that the appropriate code is updated to check the
method for signal-ness.

Task-number: QTBUG-26223
Change-Id: I306f6622aaa710d86c01d5bbc5146eecce7cf2c3
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoEnable literal Qt enum assignment to enum properties.
Michael Brasser [Thu, 14 Jun 2012 00:18:45 +0000 (10:18 +1000)]
Enable literal Qt enum assignment to enum properties.

Assigning Qt global enums to enum properties was previously handled as
a binding, rather than a literal assignment.

Change-Id: If6bb65f63b34f4e10c0636221ddadb11f7025735
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
12 years agoFix warnings in declarative tests.
Friedemann Kleint [Wed, 13 Jun 2012 10:10:18 +0000 (12:10 +0200)]
Fix warnings in declarative tests.

- Unused variables and test data.
- () around operator &&.
- Conversion of false to 0-pointer where QVariant was intended.
- Missing enumeration value.
- Remove duplicated  qqmlecmascript entry from qml.pro
  (has an internal check for no-widgets).

Change-Id: Ie030167e22bce26e3988a4406c630fb460f61a3c
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoQtQuick: Fix warnings about deprecated QWeakPointer usage.
Friedemann Kleint [Wed, 13 Jun 2012 10:09:15 +0000 (12:09 +0200)]
QtQuick: Fix warnings about deprecated QWeakPointer usage.

Use QPointer for QObject-derived classes.

Change-Id: Ia7be2354b8b3bbce04316185f49a80e76057a18b
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoMark tst_qquicklistview insignificant for Mac.
Friedemann Kleint [Wed, 20 Jun 2012 12:44:35 +0000 (14:44 +0200)]
Mark tst_qquicklistview insignificant for Mac.

Task-number: QTBUG-26244

Change-Id: I314fa5293ffaa72dafa843d1a950d0abed5a4516
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoCleanup SG properly in QQuickCanvas
Alan Alpert [Mon, 18 Jun 2012 04:08:55 +0000 (14:08 +1000)]
Cleanup SG properly in QQuickCanvas

The scenegraph renderer and root node were not cleaned up when all other
SG nodes are. This leads to a possible case where the SG nodes
regenerate for the canvas without being properly linked to the renderer.

Task-number: QTBUG-23571
Change-Id: I19084af998cb7482bfddc87770ee9b5e0aad3a6c
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoFix binding errors in cppextensions examples.
Andrew den Exter [Wed, 20 Jun 2012 04:11:02 +0000 (14:11 +1000)]
Fix binding errors in cppextensions examples.

Import QtQuick 2.0 for value type support in the examples which use
QColor.

Task-number: QTBUG-26207
Change-Id: I1a477f7b9ff90862d64e2d5545171728c6f97aaa
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoGive the example Loader in the shared launcher focus.
Andrew den Exter [Wed, 20 Jun 2012 00:13:29 +0000 (10:13 +1000)]
Give the example Loader in the shared launcher focus.

Allows an example to receive focus the same as if it were the root item
in a scene.

Change-Id: Iedd31236db50ba985aebe3bd82a5af8803dc0f17
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
12 years agoFix missing content in installed calculator demo.
Andrew den Exter [Tue, 19 Jun 2012 07:25:26 +0000 (17:25 +1000)]
Fix missing content in installed calculator demo.

Add the content directory to the project installs.

Task-number: QTBUG-26203
Change-Id: I08b79534f522024b289724ebaba206715b8bfbea
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
12 years agoResolve example qml file paths relative to the executable path.
Andrew den Exter [Tue, 19 Jun 2012 07:06:22 +0000 (17:06 +1000)]
Resolve example qml file paths relative to the executable path.

Task-number: QTBUG-26202
Change-Id: I0ef9d2aa2248c8ddfd61afcd8bca731325f8d239
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
12 years agoFix compile of Same Game demo.
Andrew den Exter [Tue, 19 Jun 2012 06:53:15 +0000 (16:53 +1000)]
Fix compile of Same Game demo.

Task-number: QTBUG-26204
Change-Id: I79059969033c57f82437bbec4e4323bfa0cc9430
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
12 years agoFix some of the bundle test failures on Windows.
Glenn Watson [Wed, 20 Jun 2012 01:36:31 +0000 (11:36 +1000)]
Fix some of the bundle test failures on Windows.

The Q_PACKED macro is not supported on Windows, so the code that
serializes the bundles does not work with the loading code. Change
the maximum bundle size to 4 GB so that struct packing is not
required.

Change-Id: Ia7c8aa856ac532732eb6e76df813f46acd66b6f2
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoUpdate example in a doc.
Sukhyun Kim [Wed, 13 Jun 2012 04:47:28 +0000 (13:47 +0900)]
Update example in a doc.

There are "TypeError" errors.
When using ListView.view in a delegate, the id of child of delegate has to
attach in front of ListView.view to access the model and its properties in this case.

Change-Id: I4610f1fc8b0d085f7cba137e76e0578be7b51e23
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
12 years agoDon't start running if a frame property is set
Alan Alpert [Wed, 13 Jun 2012 08:49:12 +0000 (18:49 +1000)]
Don't start running if a frame property is set

This fixes an error where running couldn't be reliably set, if a frame
property was also being set during initialization. With this fixed, the
autotest is no longer unstable.

Also fixed is a related issue where start/stop/restart were active
before componentComplete.

Change-Id: I34c6d872f2f146d38c65167eda8c0a97525d7f4e
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
12 years agoRemove hardcoded qdoc3 command from qtdeclarative_doc.pri
Chris Adams [Tue, 19 Jun 2012 06:41:35 +0000 (16:41 +1000)]
Remove hardcoded qdoc3 command from qtdeclarative_doc.pri

Previously, this called qdoc3 directly, which could fail if the system
path had a pre-existing qdoc3 of a different version.

Change-Id: If68e00fd60594590d40f11b08416f220f0806bfb
Reviewed-by: Bea Lam <bea.lam@nokia.com>
Reviewed-by: Peter Yard <peter.yard@nokia.com>
12 years agoqmlscene: add --transparent argument
Girish Ramakrishnan [Thu, 14 Jun 2012 00:28:00 +0000 (17:28 -0700)]
qmlscene: add --transparent argument

The option makes qmlscene request a format with alpha for the QQuickView.

Change-Id: I6490e606dd0af534147de95783f3a2ddfa8c52c8
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoSmall cleanup: remove braces from single line conditionals.
Robin Burchell [Mon, 18 Jun 2012 15:33:58 +0000 (17:33 +0200)]
Small cleanup: remove braces from single line conditionals.

Change-Id: I20588ad0634aebec8374a570179ee43dd1b1dd3b
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
12 years agoAlign windowShown flag with qml renderer state
Charles Yin [Tue, 12 Jun 2012 04:46:12 +0000 (14:46 +1000)]
Align windowShown flag with qml renderer state

Previously, we set windowShown to true once the window is active,
this is not enough for some tests as the initial rendering may not
be finished yet and will give the wrong result for some tests which
require reading back pixels.

Change-Id: Idd67329d207aaf1734a795b40a5bcc40093cf6b8
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoQtQuick: Fix warnings about unused variables.
Friedemann Kleint [Wed, 13 Jun 2012 10:08:03 +0000 (12:08 +0200)]
QtQuick: Fix warnings about unused variables.

Change-Id: Ibe134810cc67e30a61b42ffa3be73f59c2ef96a2
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years agoUpdate Flickable velocity/overbound for each axis independently
Martin Jones [Wed, 13 Jun 2012 01:17:44 +0000 (11:17 +1000)]
Update Flickable velocity/overbound for each axis independently

We were attempting to update velocities/overbound correction for both
axes even if only one of them had changed, leading to inaccurate values
for one of the axes.  Also removes a bunch of code duplication.

Change-Id: I6a50b908992c976889373f541bdd1abad462e247
Reviewed-by: Bea Lam <bea.lam@nokia.com>
12 years agoSet a non-zero default cacheBuffer.
Martin Jones [Mon, 11 Jun 2012 23:19:35 +0000 (09:19 +1000)]
Set a non-zero default cacheBuffer.

The likelihood of constant framerate when flicking is considerably
improved by having a cacheBuffer.  Since there is only a minimal cost
in having a modest cacheBuffer, it is better to have a more optimal
default value - 320 seems a good starting point.

Change-Id: Id3c8a153821573b5b08c6fbd80d34152908d358d
Reviewed-by: Bea Lam <bea.lam@nokia.com>
12 years agotst_qquicklistview: further increase test timeout
Kent Hansen [Tue, 12 Jun 2012 17:46:48 +0000 (19:46 +0200)]
tst_qquicklistview: further increase test timeout

This test has timed out on a recent test run, but appeared to be
making progress. Increase the timeout, and remove the
insignificant_test flag.

Change-Id: Ic3d5f0dbf43e5d0a284ae87c9fd21552b759cbad
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoAdd a version 2 import for FolderListModel
Alan Alpert [Tue, 12 Jun 2012 06:00:10 +0000 (16:00 +1000)]
Add a version 2 import for FolderListModel

An interim measure to allow FolderListModel using examples to adapt.
Longer term, version 1 will from be the QtQuick 1.0 module and version
2 will be from the QtQuick 2.0 module. This is implemented in change
Ic378b0b9f715422a2b2f4c1037adf3a07ced7c0f.

Task-number: QTBUG-25191
Change-Id: Ic378b0b9f715422a2b2f4c1037adf3a07ced7c0e
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoRemove non-templated qobject module api registration function
Chris Adams [Mon, 14 May 2012 03:01:29 +0000 (13:01 +1000)]
Remove non-templated qobject module api registration function

Previously, both templated and non-templated qobject module api
registration functions were provided as public API.  The non-templated
version is identical to the templated version, except that bindings
which access properties of module apis registered with that function
cannot be optimized with v4.

This commit removes the non-templated version of the function.

Change-Id: Ic417aa241f1172bf6d055bdc7f528d7e9304097b
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoAdd pixel comparation support to qmltest
Charles Yin [Wed, 6 Jun 2012 02:10:32 +0000 (12:10 +1000)]
Add pixel comparation support to qmltest

Change-Id: Icdee3fab497cc46260bbb9af89f4402fdc027fef
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoAllow setting horizontal and vertical tile modes in sci files
Yann Bodson [Thu, 7 Jun 2012 03:21:56 +0000 (13:21 +1000)]
Allow setting horizontal and vertical tile modes in sci files

It was still using the old 'tileRule' name.
Also make sci file parser less strict with h/v tile mode values.

Task-number: QTBUG-26022
Change-Id: I41b7571b42a0fb9bd2cfab8ce2e76e57addabefd
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
12 years agoEmit itemChanged when Loader fails to load a source.
Alan Alpert [Tue, 12 Jun 2012 01:47:13 +0000 (11:47 +1000)]
Emit itemChanged when Loader fails to load a source.

As per the source comment, it is not actually tracked whether item was
null before. This is consistent with the behaviour in loadFromSource,
where setting a source to null always emits item changed.

This is reasonable behaviour, because it only occurs in unexpected error
states where the program logic likely expects a changed signal anyways.

Change-Id: I160ab04dc1b5c578ee508f4adbca65e8da5b16be
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
12 years agoFix view delegate parent binding regression.
Martin Jones [Tue, 12 Jun 2012 01:54:40 +0000 (11:54 +1000)]
Fix view delegate parent binding regression.

762b4d90110465aeceb96f44cd06dcda229dfe89 introduced a regression by
setting the item parent after completion.  This was to avoid rendering
an incubated object before completion.  However this breaks bindings.

Restore setting the item parent before completion, and ensure items are
not rendered until completed.

Change-Id: Ifc9d0c34ee62e687889c32ffab7c091b4c8cc470
Reviewed-by: Bea Lam <bea.lam@nokia.com>
12 years agoCheck for null ptr in qmlobject_cast definition
Chris Adams [Tue, 12 Jun 2012 07:47:15 +0000 (17:47 +1000)]
Check for null ptr in qmlobject_cast definition

Previously, the input object wasn't checked for nullness, and thus
the qmlobject_cast could assert.

Change-Id: I3552150953cef8411a860a381e28b1d681494b08
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years agoRemove qtbase pin
Kent Hansen [Sun, 10 Jun 2012 19:06:55 +0000 (21:06 +0200)]
Remove qtbase pin

Change-Id: I0fa3fb45aa26fe4eca15fa0bcb1f67c99925a21e
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years agoAdapt to connection-related changes in qtbase
Kent Hansen [Sun, 3 Jun 2012 19:10:32 +0000 (21:10 +0200)]
Adapt to connection-related changes in qtbase

The QQmlData hooks signalEmitted() and receivers() now receive the
index in the signal index range (i.e., excluding non-signal methods).
This was done to avoid Q(Meta)Object having to compute the class's
method offset; the signal offset should be sufficient for everyone.

This required adapting QQmlNotifier, QQmlBoundSignal,
QQmlPropertyCache and friends to use the signal index range whenever
a property's notify signal is involved in the internal connection
lists and property captures.

Using the signal index range also reduces the memory used for
NotifyList::notifies, since useless entries for non-signal methods
will no longer be created.

Change-Id: I62872fbea5a1f829b8b03bae3fc1e6acd84cf886
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years agoMark qquickanimatedsprite autotest as insignificant
Kent Hansen [Tue, 12 Jun 2012 07:52:28 +0000 (09:52 +0200)]
Mark qquickanimatedsprite autotest as insignificant

Failed twice on macx-clang developer-build OSX 10.7 only.

Change-Id: If6b4aa6b88c5db8eaa04dd241bc0b43808b3983a
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoMark qquicklistview autotest as insignificant
Kent Hansen [Tue, 12 Jun 2012 10:01:53 +0000 (12:01 +0200)]
Mark qquicklistview autotest as insignificant

Flaky on macx-clang developer-build OSX 10.7.

Change-Id: I4e8b7604dff9dd64efd6110e2cbde461d82b94d3
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoEmit currentFrameChanged signal when needed
Alan Alpert [Thu, 10 May 2012 10:26:13 +0000 (20:26 +1000)]
Emit currentFrameChanged signal when needed

Task-number: QTBUG-25039

Change-Id: I8bd5fd40a5fee1314f0401ed4708d73ed1cfad94
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
12 years agoAllow Loader to load non-Item types.
Martin Jones [Tue, 12 Jun 2012 00:16:47 +0000 (10:16 +1000)]
Allow Loader to load non-Item types.

Loader has a more convenient API for loading/unloading components
than the dynamic object creation APIs.  Remove the Item-only
restriction.

Change-Id: I6f9ecc8514ff1e814f7e56a3386814ba211b7e4f
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
12 years agoPin the qtbase SHA1
Kent Hansen [Sun, 10 Jun 2012 18:59:02 +0000 (20:59 +0200)]
Pin the qtbase SHA1

In preparation of staging
https://codereview.qt-project.org/#change,27471 in qtbase, which
isn't source/behaviorally compatible with qtdeclarative.

https://codereview.qt-project.org/#change,27477 adapts qtdeclarative
to the qtbase change, and will be staged (together with the change
that unpins the SHA1) once the qtbase change has gone in.

Change-Id: Ia47f1d86855a388a5ecf9520ed21dd52c43b1b95
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years agoAdd support for using atlas textures directly in ShaderEffects.
Kim Motoyoshi Kalland [Fri, 8 Jun 2012 10:11:29 +0000 (12:11 +0200)]
Add support for using atlas textures directly in ShaderEffects.

Change-Id: Ib2b68c13513e2c1102264a3eb1d91ed840134159
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoAvoid string-based lookup in IS_SIGNAL_CONNECTED
Kent Hansen [Sun, 3 Jun 2012 18:30:49 +0000 (20:30 +0200)]
Avoid string-based lookup in IS_SIGNAL_CONNECTED

Specify the signal as a member function suitable for passing to
QMetaMethod::fromSignal(), and use the new function
QMetaObjectPrivate::signalIndex(QMetaMethod) to get the index in the
signal range.

Change-Id: If16daa24c2699f7749a17decb611cf395d89d0c4
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years agoFix compilation for QT_NO_ACCESSIBILITY
Tasuku Suzuki [Mon, 28 May 2012 00:35:27 +0000 (09:35 +0900)]
Fix compilation for QT_NO_ACCESSIBILITY

Change-Id: Ic817ab15cb31bcd1c35ba5fab163dc0f52c36609
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoFix compilation for QT_NO_FILEDIALOG
Tasuku Suzuki [Mon, 28 May 2012 00:34:32 +0000 (09:34 +0900)]
Fix compilation for QT_NO_FILEDIALOG

Change-Id: I2112bc8c9fe58cda84f498f9062b4b32b9ef0c24
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoFixed glyph margin in QSGDistanceFieldGlyphNode.
Yoann Lopes [Wed, 6 Jun 2012 15:59:59 +0000 (17:59 +0200)]
Fixed glyph margin in QSGDistanceFieldGlyphNode.

The margin was too big in some cases, causing visual artifacts.
The margin should never be bigger than the margin used in the glyph
cache.

Change-Id: Ia6bd3a9d4a98a2a3484d0e5e803de95ca14fffbb
Reviewed-by: Yoann Lopes <yoann.lopes@nokia.com>
12 years agoSupport for variable glyph width in QSGDefaultDistanceFieldGlyphCache.
Yoann Lopes [Wed, 6 Jun 2012 15:52:19 +0000 (17:52 +0200)]
Support for variable glyph width in QSGDefaultDistanceFieldGlyphCache.

The glyphs are not stored in a fixed 64x64px tile anymore.
Glyphs are stored in area equal to <glyph_width> + 10 (margin) x 64px.
Allocation is now done with QSGAreaAllocator.
When glyph recycling is needed, unused glyphs are freed until the new
glyph can fit in the cache.

Change-Id: I179a8f17bfe35468bdb63bca5113ea4d0f06c414
Reviewed-by: Yoann Lopes <yoann.lopes@nokia.com>
12 years agoImprove on scenegraph documentation.
Gunnar Sletta [Mon, 4 Jun 2012 14:56:17 +0000 (16:56 +0200)]
Improve on scenegraph documentation.

Change-Id: Ib584a45454f6fd2a3c0bfb32a76b19839e4a2a09
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
12 years agoRemove particles examples launcher
Alan Alpert [Wed, 6 Jun 2012 10:35:51 +0000 (20:35 +1000)]
Remove particles examples launcher

New examples guidelines include its own launcher scheme.

Change-Id: I93f2ef40ba2b9344e9e3074ef31d7b6d2aed72b1
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoExport QQuickListModel (marked private)
Martin Jones [Fri, 8 Jun 2012 06:16:32 +0000 (16:16 +1000)]
Export QQuickListModel (marked private)

There are some things that are difficult to achieve without this one.
Export for the more intrepid developer.

Change-Id: I3918835f66b9aa773eb5f2f2c58fb82aecc4b446
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
12 years agoUpdate Affector folder of examples to guidelines
Alan Alpert [Wed, 6 Jun 2012 10:28:17 +0000 (20:28 +1000)]
Update Affector folder of examples to guidelines

Change-Id: I1fa0e8424f94cf954098b7734ba25feab0790828
Reviewed-by: Bea Lam <bea.lam@nokia.com>
12 years agoFix handling of a direct child stealing focus from a parent-less item.
Andrew den Exter [Thu, 7 Jun 2012 02:29:07 +0000 (12:29 +1000)]
Fix handling of a direct child stealing focus from a parent-less item.

When an item gains focus it will remove focus from the previous item
that held focus.  Normally this is the sub-focus item of an ancestor
item, however if the item with focus is at the root of the tree there
will be no sub-focus item and the focus of root item needs to be cleared
instead.  Likewise if an item doesn't have a parent, focus still needs
to be removed from any sub focus item.

Change-Id: I0f192692e21e288c87ba0104f3d597363190f87c
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoPerformance should always be better with cacheBuffer
Martin Jones [Fri, 8 Jun 2012 01:19:09 +0000 (11:19 +1000)]
Performance should always be better with cacheBuffer

Setting a cacheBuffer introduced more work for the scenegraph due to
cached delegates' visibility being toggled.  Changing visibility is
expensive as it is proagated to all children.  Introduce a cheap
method of hiding a branch instead.

Also avoid initiating incubation in the same frame as a completed
creation.

Change-Id: I573bcf37f441f96a7502d445be50ef4301f217d5
Reviewed-by: Bea Lam <bea.lam@nokia.com>
12 years agoDon't cache item indexes in VisualDataModel.
Andrew den Exter [Tue, 5 Jun 2012 06:33:52 +0000 (16:33 +1000)]
Don't cache item indexes in VisualDataModel.

Sacrifice constant time lookup of indexes for rarely used features for
reduced memory usage.

Applications which use neither Packages, nor the VisualDataGroup api
don't ever need to query the index of an item so caching and maintaining
those indexes in unnecessary. Where they are used this add a cost
scanning for the index of an item in the cache, and in some instances
a lookup cost in the compositor.

Change-Id: I7d3c21a27a8a3c068c5ae2e1e326ff573c44d712
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoDestroy incubated objects if they are not claimed when ready.
Andrew den Exter [Tue, 5 Jun 2012 04:16:50 +0000 (14:16 +1000)]
Destroy incubated objects if they are not claimed when ready.

If model data is removed while an object is incubating for it the view
cannot cancel the incubation because the index is invalidated. So if
the object has not been referenced after signalling it is ready assume
it's been abandoned and destroy it.

Change-Id: I32708e940cfbccbe0d330ad7822f29d3c1f39d13
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agorebound property for Flickable
Bea Lam [Wed, 6 Jun 2012 01:17:19 +0000 (11:17 +1000)]
rebound property for Flickable

This property specifies the transition to be used when the
flickable snaps back to its bounds.

Change-Id: I2bb9680dad219a4c7c911f0e4dda37ae739349c6
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoput private Qt dependencies below load(qt_module_config)
Oswald Buddenhagen [Fri, 25 May 2012 09:30:40 +0000 (11:30 +0200)]
put private Qt dependencies below load(qt_module_config)

this will soon be needed to omit them from the master include header.

Change-Id: I8f62a228a68fd53605eaf3f39f412a7b30c529b3
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoDon't double emit threaded signals
Aaron Kennedy [Wed, 6 Jun 2012 13:12:01 +0000 (14:12 +0100)]
Don't double emit threaded signals

As the metacall event was posted to the object emitting the signal, it
caused the signal to be *reemitted* on the object thread.  If both QML
and Qt connections were present, the Qt ones were run twice.

Change-Id: I4bc1402ab0a43762ff6fef173ecc77fc20508bad
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>