profile/ivi/qtdeclarative.git
12 years agoSay hello to QtQuick module
Kent Hansen [Wed, 23 Nov 2011 14:14:07 +0000 (15:14 +0100)]
Say hello to QtQuick module

This change moves the QtQuick 2 types and C++ API (including
SceneGraph) to a new module (AKA library), QtQuick.

99% of this change is moving files from src/declarative to
src/quick, and from tests/auto/declarative to
tests/auto/qtquick2.

The loading of QtQuick 2 ("import QtQuick 2.0") is now delegated to
a plugin, src/imports/qtquick2, just like it's done for QtQuick 1.

All tools, examples, and tests that use QtQuick C++ API have gotten
"QT += quick" or "QT += quick-private" added to their .pro file.

A few additional internal QtDeclarative classes had to be exported
(via Q_DECLARATIVE_PRIVATE_EXPORT) since they're needed by the
QtQuick 2 implementation.

The old header locations (e.g. QtDeclarative/qquickitem.h) will
still be supported for some time, but will produce compile-time
warnings. (To avoid the QtQuick implementation using the
compatibility headers (since QtDeclarative's includepath comes
first), a few include statements were modified, e.g. from
"#include <qsgnode.h>" to "#include <QtQuick/qsgnode.h>".)

There's a change in qtbase that automatically adds QtQuick to the
module list if QtDeclarative is used. Together with the compatibility
headers, this should help reduce the migration pain for existing
projects.

In theory, simply getting an existing QtDeclarative-based project
to compile and link shouldn't require any changes for now -- but
porting to the new scheme is of course recommended, and will
eventually become mandatory.

Task-number: QTBUG-22889
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Change-Id: Ia52be9373172ba2f37e7623231ecb060316c96a7
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
12 years agoqmlplugindump: Fix missing flush for objects that don't fit a line.
Christian Kamm [Fri, 2 Dec 2011 08:30:48 +0000 (09:30 +0100)]
qmlplugindump: Fix missing flush for objects that don't fit a line.

The missing flush could result in script bindings appearing after the
closing brace of an object.

Change-Id: If05764619668cc4a86f7364f6cd7feeb0d6f6e32
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
12 years agoAdd dynamicRoles mode to ListModel for extra flexibility.
Glenn Watson [Thu, 1 Dec 2011 00:40:44 +0000 (10:40 +1000)]
Add dynamicRoles mode to ListModel for extra flexibility.

ListModel contains a new property called dynamicRoles.
By default this property is disabled, meaning that
the type of a given role cannot be changed dynamically.
However, when this property is set, the type of a
role can change between elements. This allows more
flexibility but comes at a significant performance
cost over the default static role mode.

Change-Id: I478d48c882f51ba2dde37f88e2aac744e919b68b
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoAddd expectFail() to qmltestexmaple to avoid failure report from CI.
Charles Yin [Fri, 2 Dec 2011 00:47:59 +0000 (10:47 +1000)]
Addd expectFail() to qmltestexmaple to avoid failure report from CI.

Change-Id: I35637c9951085d42d216b8eb1eb03ef1206d51d6
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoUse QWidgetTextControl in the QtQuick1 TextEdit.
Andrew den Exter [Tue, 29 Nov 2011 05:33:56 +0000 (15:33 +1000)]
Use QWidgetTextControl in the QtQuick1 TextEdit.

QDeclarative1TextEdit and QTextEdit have the same compatbility
requirements so it makes sense they continue sharing the same line
control implementation.  This allows the QtQuick 2 TextInput to diverge
without creating a third variation of QTextControl,

Task-number: QTBUG-22627
Change-Id: Id4a8f6a17aeb756c3385cf8fca3de61b8c4be757
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoUse QWidgetLineControl in the QtQuick1 TextInput.
Andrew den Exter [Thu, 10 Nov 2011 03:20:45 +0000 (13:20 +1000)]
Use QWidgetLineControl in the QtQuick1 TextInput.

QDeclarative1TextInput and QLineEdit have the same compatbility
requirements so it makes sense they continue sharing the same line
control implementation.  This allows the QtQuick 2 TextInput to diverge
without creating a third variation of QLineControl.

Task-number: QTBUG-22627
Change-Id: Ic06f66f1cb55e78f7129889a4877c3aba5ba72f6
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoRemove QSGContext and QSGTexture from QDeclarativePixmapData
Gunnar Sletta [Fri, 2 Dec 2011 06:59:44 +0000 (07:59 +0100)]
Remove QSGContext and QSGTexture from QDeclarativePixmapData

In order to cleanly support multiple windows we need to not
have the QSGContext reference in QDeclarativeEngine and we
need to be able to have one copy of the texture for each
QSGContext that is not sharing when we have multiple windows.

This also makes it easier to the release graphical resources from
a running application, which is another feature that we want
to eventually implement.

This patch does remove an adaptation feature which is the
decodeToTexture, which seemed like a good idea at the time
but in hindsight has not been used for anything.

Edit: resolved conflict in qquickimage.cpp
Edit: updated QDeclarativePixmap testcase
Edit: updated QQuickImage testcase
Edit: Rebased on top of QDeclarativePixmapCacheChanges

Change-Id: Ifc61dd8158d3f841437d029b6031a91196145517
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoFix test warnings
Aaron Kennedy [Thu, 1 Dec 2011 14:34:10 +0000 (14:34 +0000)]
Fix test warnings

If the enums aren't correctly registered, the use of signal spy always
causes a warning.

Change-Id: If7fd0c1765ac33e0c1548701e199e710e2fe3b30
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoFix pixmap leak in Text with embedded images.
Martin Jones [Fri, 2 Dec 2011 00:23:08 +0000 (10:23 +1000)]
Fix pixmap leak in Text with embedded images.

Insert into hash with same key we use to lookup :-/

Change-Id: I1d70916fab578c8280a11b3a03fb7cfd6ad4d594
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
12 years agoFix listview test warning
Martin Jones [Thu, 1 Dec 2011 23:36:21 +0000 (09:36 +1000)]
Fix listview test warning

Change-Id: I24cead9eb52f9e1cca39ffe5d6e32a57453186d6
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoFix gridview test warning.
Martin Jones [Thu, 1 Dec 2011 22:58:49 +0000 (08:58 +1000)]
Fix gridview test warning.

Also removed unnecessary QtQuick 1.1 test.

Change-Id: I6f048d22fbbaa817358da7bb5d85187fabc119ff
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoDon't use idle priority for background threads.
Martin Jones [Thu, 1 Dec 2011 06:55:51 +0000 (16:55 +1000)]
Don't use idle priority for background threads.

Using idle priority for image loading meant that images could
remain unloaded for a looong time.  Change to LowestPriority.

Change-Id: Ieb89e94f5e37b9fe795a76368e4d23edb40978f7
Reviewed-by: Bjørn Erik Nilsen <bjorn.nilsen@nokia.com>
12 years agosync to an earlier qtbase
Alan Alpert [Fri, 2 Dec 2011 03:52:44 +0000 (13:52 +1000)]
sync to an earlier qtbase

change ba635d7e74472f3a54c0c4686966af46d9035c6f breaks qtdeclarative CI.
Using an earlier qtbase while the matter is investigated.

Task-Number: QTBUG-22985
Change-Id: I2d1c5f03f48d4383fd84a42612314bea0bdc675d
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoIgnore expected warning
Aaron Kennedy [Thu, 1 Dec 2011 17:14:19 +0000 (17:14 +0000)]
Ignore expected warning

Change-Id: I6e90537461fa4939c724b3031f3b3b5f04343d8e
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years agoAutotest
Aaron Kennedy [Fri, 14 Oct 2011 07:41:29 +0000 (17:41 +1000)]
Autotest

Change-Id: I796ef5e0d70a7e3a95858468583c4ecb447991ee
Task-number: QTBUG-21864
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years agoIgnore expected warning message
Aaron Kennedy [Thu, 1 Dec 2011 14:08:57 +0000 (14:08 +0000)]
Ignore expected warning message

Change-Id: I80d2b6e082f6e648ee888820903bc81a21c0d302
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years agoImprove value type read performance
Aaron Kennedy [Wed, 30 Nov 2011 17:54:03 +0000 (17:54 +0000)]
Improve value type read performance

On x86, this gives ~3x improvement in property read time.

Change-Id: I8f75e9bb7450bc56ca42f8258c3a5641bc9c18d3
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
12 years agoTake multi-line expressions into account when rewriting expressions
Kai Koehne [Wed, 30 Nov 2011 15:27:01 +0000 (16:27 +0100)]
Take multi-line expressions into account when rewriting expressions

Take into account the newlines expressions might have when
 combining multiple expressions into one.

Change-Id: Ib7170f624b6b6dee522e2d376a513ac08a8baa46
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years agoRemove debugging
Aaron Kennedy [Thu, 1 Dec 2011 12:30:17 +0000 (12:30 +0000)]
Remove debugging

Change-Id: Ib672ae608446acb1ddf7df8354fb7ae051b9e834
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
12 years agoFix test warnings
Aaron Kennedy [Thu, 1 Dec 2011 15:03:07 +0000 (15:03 +0000)]
Fix test warnings

Change-Id: I35428417ef6c21166ac991c28a540fa4e8ec19fb
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years agoIgnore test warning
Aaron Kennedy [Thu, 1 Dec 2011 14:55:43 +0000 (14:55 +0000)]
Ignore test warning

Change-Id: I030a8be90cc95105ca016b74ad017c46ba7ffe17
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years agoDebugger autest: Don't show debugee output for expected failures
Kai Koehne [Thu, 1 Dec 2011 14:54:46 +0000 (15:54 +0100)]
Debugger autest: Don't show debugee output for expected failures

Change-Id: Ifd068f8c680dcde7bf9c2e078e13eeee1bcba552
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years agoDelete created objects
Aaron Kennedy [Thu, 1 Dec 2011 14:43:01 +0000 (14:43 +0000)]
Delete created objects

This eliminates "leak" warnings that were generated when the test
exited.

Change-Id: I66088f29b88b95662d6ab4e65b5e2a77b415a9f9
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years agoDon't build an app_bundle on OS X
Aaron Kennedy [Thu, 1 Dec 2011 14:03:18 +0000 (14:03 +0000)]
Don't build an app_bundle on OS X

Change-Id: I7d5aa114baaea881a3fe56157e2530d1f89be91c
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years agoWindows: Fix building of XML list model plugin.
Friedemann Kleint [Thu, 1 Dec 2011 13:14:43 +0000 (14:14 +0100)]
Windows: Fix building of XML list model plugin.

Change-Id: Ia070f4b4fd726d201dde7aa43e2c62eacfaff40e
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoDelete created objects
Aaron Kennedy [Thu, 1 Dec 2011 13:59:47 +0000 (13:59 +0000)]
Delete created objects

This eliminates "leak" warnings that were generated when the test
exited.

Change-Id: Ia186241c05c28a6e5eb7b6b431e084f95f5934be
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years agoMove QDeclarativePropertyValueInterceptor into a private header
Aaron Kennedy [Thu, 1 Dec 2011 11:11:43 +0000 (11:11 +0000)]
Move QDeclarativePropertyValueInterceptor into a private header

This should never have been public.

Change-Id: I77811413c93fdc7767d0921e12284e9a8bc88752
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoRemove debugging output
Aaron Kennedy [Thu, 1 Dec 2011 13:31:32 +0000 (13:31 +0000)]
Remove debugging output

The console.log() is not a significant part of the test, so it can be
removed.  The exception will still be thrown if keys is not a function.

Change-Id: Ifaec6e0ed5ecc32ad7b885bff31df493120ed9aa
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoExport QQuickFlickable to make it possible to use it as private API.
Andras Becsi [Tue, 29 Nov 2011 14:51:24 +0000 (15:51 +0100)]
Export QQuickFlickable to make it possible to use it as private API.

Make it possible for the QtWebKit WebView to use Flickable as a base
class by depending on QtDeclarative private API for now.

Change-Id: Ia7b8a4aa1c59b9a089b4beecb0d9af5cf8883f07
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoRemove debugging
Aaron Kennedy [Thu, 1 Dec 2011 13:39:59 +0000 (13:39 +0000)]
Remove debugging

Change-Id: I64cc9fb96f5f456cb9b18ba5706a79bf7c6cde16
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years agoDon't use deprecated method
Aaron Kennedy [Thu, 1 Dec 2011 13:36:47 +0000 (13:36 +0000)]
Don't use deprecated method

Change-Id: I480dc4de58ce54bec353d33cddd73b817c588304
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years agoIgnore test warnings
Aaron Kennedy [Thu, 1 Dec 2011 13:22:12 +0000 (13:22 +0000)]
Ignore test warnings

Change-Id: Ib22ea43970e2e4c9635063dc3af6d6f130cc2a18
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years agoIgnore expected warning
Aaron Kennedy [Thu, 1 Dec 2011 12:39:51 +0000 (12:39 +0000)]
Ignore expected warning

Change-Id: I09696b9d522fd791a4a33f812bb3c858bfd692ff
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years agoFix uninitialized member variable in QDeclarativeTextEdit
Pekka Vuorela [Thu, 17 Nov 2011 16:10:22 +0000 (18:10 +0200)]
Fix uninitialized member variable in QDeclarativeTextEdit

Change-Id: I7ef3902488bb4ba1129933e3a4015e266be8b821
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoMade TextInput mouse events commit preedit
Pekka Vuorela [Wed, 16 Nov 2011 11:43:05 +0000 (13:43 +0200)]
Made TextInput mouse events commit preedit

Similar to what was earlier done on QWidgets editors.
Additionally updated tests to check QInputPanel::invokeAction instead
of the obsolete QInputContext mouse handler.

Change-Id: Ia2bd22eebdeed79cff7a4925129b28dd1500b1ad
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
12 years agoAdd missing tests
Aaron Kennedy [Thu, 1 Dec 2011 12:28:46 +0000 (12:28 +0000)]
Add missing tests

Change-Id: I73df9b553045acf8dd4164543d42ba6db48dced6
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years agoCompile MSVC2008 and remove unneeded reference to <stdint.h>
Jan-Arve Saether [Thu, 1 Dec 2011 09:09:05 +0000 (10:09 +0100)]
Compile MSVC2008 and remove unneeded reference to <stdint.h>

Change-Id: Ic6acdb2e9cba970d4096582c125c64d7fd4650ee
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoFixed crash when updating Image.source and BorderImage.source
Gunnar Sletta [Thu, 1 Dec 2011 08:42:21 +0000 (09:42 +0100)]
Fixed crash when updating Image.source and BorderImage.source

We need to update the texture pointer in the scene graph node
when the imagedata has changed.

Change-Id: I0246626d3ebb66db9c5cf85fb1c2034ed233984f
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoRelease pixmap cache data to avoid leaking memory
Chris Adams [Mon, 21 Nov 2011 23:59:33 +0000 (09:59 +1000)]
Release pixmap cache data to avoid leaking memory

Previously, QDeclarativePixmapStore did not release cache entries on
destruction.  This commit ensures that all cache entries are released
properly.  Note that while any QDeclarativePixmapData which contains
a texture will be deleted, the texture itself will be scheduled for
cleanup rather than released directly.

Task-number: QTBUG-22742
Change-Id: I62ddf57f2b55b732ab369321eb9ed0d7af01c135
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoAllow current item creation to interrupt async delegate creation.
Martin Jones [Thu, 1 Dec 2011 04:30:44 +0000 (14:30 +1000)]
Allow current item creation to interrupt async delegate creation.

Fixes unstable test tst_QQuickGridView::insertBeforeVisible().

Change-Id: Iebf02d3c4c202b300409be567906c64c02917dda
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
12 years agoRepeater delegates have no parent in Component.onCompleted
Martin Jones [Thu, 1 Dec 2011 03:03:31 +0000 (13:03 +1000)]
Repeater delegates have no parent in Component.onCompleted

Task-number: QTBUG-22279

Change-Id: I5c0b4a9becfee06dfc4a52e546ad81fb0b6f238a
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
12 years agoEnsure flickable velocity is updated when under heavy load.
Martin Jones [Thu, 1 Dec 2011 01:48:59 +0000 (11:48 +1000)]
Ensure flickable velocity is updated when under heavy load.

If the Flickable is forced to move very quickly due to highlight motion
the smoothed velocity animation may not have an opportunity to run
before being reset, resulting in the velocity not being updated.  In this
case just set the velocity directly since the motion is driven by an
animation anyway.

Change-Id: I1e5e9396f4c1cd12e95c6ac47941dad25e4aa897
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
12 years agoChange the license header from BSD to LGPL
Charles Yin [Tue, 29 Nov 2011 03:49:29 +0000 (13:49 +1000)]
Change the license header from BSD to LGPL

Change-Id: I68b118f45d0f34607af1a727f24bc94ddb6b6a07
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoMove XmlListModel to seperate plugin
Charles Yin [Wed, 16 Nov 2011 07:58:19 +0000 (17:58 +1000)]
Move XmlListModel to seperate plugin

XmlListModel is the only feature inside QtDeclarative which depends on
the QtXmlPatterns module, move this item to a separate plugin can reduce
the unnecessary dependency in most use cases.

To use the new XmlListModel, an additional "import QtQuick.xmllistmodel 2.0" is
needed.

Task-number:QTBUG-22158
Change-Id: I9e19eb6cbba46cd40fb7ffcdbd741f346779a54d
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoHave tutorial built along with other examples
Alan Alpert [Wed, 30 Nov 2011 06:44:05 +0000 (16:44 +1000)]
Have tutorial built along with other examples

Change-Id: I9f64659ca1621a5fea8e9013ecd264d971207d4d
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoAdd support for assigning literal value to sequence property
Chris Adams [Wed, 2 Nov 2011 00:21:37 +0000 (10:21 +1000)]
Add support for assigning literal value to sequence property

It is a language semantic that we allow clients to assign a single
value to a sequence/list property (assuming that the types match).
Now that we support sequence types, this commit adds support for
this semantic by determining whether the built-in type of the literal
corresponds to the associated sequence (eg, int for QList<int>, qreal
for QList<qreal>, bool for QList<bool>, QString for QStringList etc).

Similarly, some value types can be constructed from literal string
values (via string converters) and these need to be handled also.

Task-number: QTBUG-18062
Task-number: QTBUG-21770
Change-Id: Iacd91b2af122cd8f20b7df2fa6056a7d7c52bf53
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years agoDon't update dependent anchors on destruction unless required.
Michael Brasser [Wed, 30 Nov 2011 06:03:10 +0000 (16:03 +1000)]
Don't update dependent anchors on destruction unless required.

Change-Id: Ic088e800d5bbad0a819824a21b4c0bf430126786
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoCleanup and optimize QQuickContents.
Michael Brasser [Wed, 30 Nov 2011 04:58:12 +0000 (14:58 +1000)]
Cleanup and optimize QQuickContents.

Change-Id: I12e51b431a7568bc80d8200d1c619373a72521c0
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoNon-blocking view delegate instantiation.
Martin Jones [Thu, 3 Nov 2011 05:52:13 +0000 (15:52 +1000)]
Non-blocking view delegate instantiation.

Task-number: QTBUG-21792

Change-Id: I29a4028cd24eb55d4768aacaa3abbd1786061398
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
12 years agoV8Profiler: make the profiler run in the main thread
Christiaan Janssen [Wed, 30 Nov 2011 15:03:47 +0000 (16:03 +0100)]
V8Profiler: make the profiler run in the main thread

Change-Id: I31f126c4014ee2a5045ff6d66dcfef63ec869e98
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
12 years agoExtend the grammar of QML binding declarations.
Roberto Raggi [Tue, 29 Nov 2011 12:06:47 +0000 (13:06 +0100)]
Extend the grammar of QML binding declarations.

This allows the use of non-iterative statements
on the right hand side of a binding declaration.

Change-Id: I60fac880766ba99a410b3647e41b1252677a372f
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoWhitespace fixes
Alan Alpert [Tue, 29 Nov 2011 02:37:34 +0000 (12:37 +1000)]
Whitespace fixes

Change-Id: I73d4599907474958be2112f3b0f590f14fbec99e
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
12 years agoAdd QQuickItem::setImplicitSize()
Michael Brasser [Tue, 29 Nov 2011 00:19:01 +0000 (10:19 +1000)]
Add QQuickItem::setImplicitSize()

This allows us to batch up size changes better, leading to fewer layout
recalculations.

Change-Id: I423113fab78666a99ca05439f852f57c92f6f821
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoDeleting an incubated object after setInitialState() crashes
Martin Jones [Tue, 29 Nov 2011 23:44:13 +0000 (09:44 +1000)]
Deleting an incubated object after setInitialState() crashes

Incubating objects are often parented in setInitialState(), which
can lead to the incubating object being deleted after object creation,
but before completion.  When incubator.clear() is called after
this point, it would attempt to delete the already deleted
object. This change guards the incubation object in the incubator.

Change-Id: I9585e93027250b8b6b3f1777b10ee1008ae7b818
Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
12 years agoAnchoring system optimizations.
Michael Brasser [Fri, 25 Nov 2011 02:53:57 +0000 (12:53 +1000)]
Anchoring system optimizations.

Do a better job of only updating anchors when
needed. For example, if an item is anchored to
its parent, it shouldn't react when the parent
moves, only when it resizes.

Change-Id: I57b480631fc6e89ab214b3fd337478d2e6534044
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoDebugger: Disable breakpoint relocation in JS
Kai Koehne [Tue, 22 Nov 2011 14:32:46 +0000 (15:32 +0100)]
Debugger: Disable breakpoint relocation in JS

Because we pass scripts lazily to v8, breakpoints can be relocated to
lines unexpected to the user. Therefore disable breakpoint relocation
alltogether for the time being.

Change-Id: I34b4b9b1267270014c3a17cb6cad1e3c7eded074
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
12 years agoqmlplugindump: Avoid reporting types as attaching to themselves.
Christian Kamm [Tue, 29 Nov 2011 07:52:14 +0000 (08:52 +0100)]
qmlplugindump: Avoid reporting types as attaching to themselves.

Task-number: QTCREATORBUG-6625
Change-Id: I9f778757b490cb5d79249b92f8c7b6d9d1df66e6
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
12 years agoFix the evaluation of JS switch statements in QML bindings.
Roberto Raggi [Mon, 28 Nov 2011 08:37:03 +0000 (09:37 +0100)]
Fix the evaluation of JS switch statements in QML bindings.

Task-number: QTBUG-17012

Change-Id: Ic132cf63ed08592fec9c759df1b8b4d5830acea6
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoProperly protect access to pixmap reader thread with mutex
Chris Adams [Wed, 16 Nov 2011 03:20:45 +0000 (13:20 +1000)]
Properly protect access to pixmap reader thread with mutex

Previously, access to the reader thread wasn't guarded properly,
causing a crash when the reader thread was deleted prior to
QDeclarativePixmapData (which then attempted to dereference the
thread pointer to cancel the request).  This commit adds locking
to ensure that access to the reader is protected properly.

This commit also fixes an issue where if a QDeclarativePixmapData
was deleted after its QDeclarativePixmapReply was removed from the
jobs queue but prior to processing, a pointer to the data could
be dereferenced as part of processing, but caching the required
information in the reply.

Task-number: QTBUG-22125
Change-Id: I32aa2ca41a297b48e68cb358f4aa4fafd999f215
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoAdd a length property to TextEdit.
Andrew den Exter [Mon, 28 Nov 2011 04:29:36 +0000 (14:29 +1000)]
Add a length property to TextEdit.

This returns the length of the unformatted text in a TextEdit which
should be cheaper to query than the length of the text property and
meaningful in the context of the selection and cursor properties.

Task-number: QTBUG-18949
Change-Id: Ia25c4553693923f97d299f1fdb8bfcf7f5937b13
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoAdd indexed deleter to sequence wrapper, implement length setter
Chris Adams [Mon, 21 Nov 2011 00:02:35 +0000 (10:02 +1000)]
Add indexed deleter to sequence wrapper, implement length setter

Previously, elements could not be deleted from sequences directly
without reassignment.  This commit adds an indexed deleter which
allows elements to be deleted by specifying an index.  A deleted
element will be replaced with a default-constructed element in the
sequence (slight departure from ECMA262r3 which specifies that it
should be replaced with Undefined).

This commit also implements the length property setter according
to the requirements on Array [[Put]] by ECMA262r3 which allows
removal of elements from a sequence (required for proper behaviour
of Array.prototype methods such as splice() and pop()).

Task-number: QTBUG-22808
Change-Id: I62511b3edc2ec35f92d2a2bd719278e129c98547
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoUpdate to QtQuick 2.0
Alan Alpert [Mon, 28 Nov 2011 03:16:59 +0000 (13:16 +1000)]
Update to QtQuick 2.0

Note that the plugin only exposes QObject types, not QDeclarativeItem.

Change-Id: I817d143f762239e32456a7ac8fcca29c483a4f8e
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoGet the tutorial running again
Alan Alpert [Mon, 28 Nov 2011 01:49:10 +0000 (11:49 +1000)]
Get the tutorial running again

Note that it still uses QtQuick 1.0

Change-Id: I1b6e174c2ec06ba6108f11cb295e32bc76ac3e36
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoInitial window implementation
Alan Alpert [Fri, 18 Nov 2011 09:32:56 +0000 (19:32 +1000)]
Initial window implementation

Includes adding a color property on QQuickCanvas. Note that most Window
related properties come from the QWindow inheritance.

Task-number: QTBUG-19799
Change-Id: I00f6c90a1e2a5c85d787793d6edac2cd7d5309ab
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
12 years agoRemove unused function magnitude()
Kent Hansen [Mon, 28 Nov 2011 08:38:54 +0000 (09:38 +0100)]
Remove unused function magnitude()

Change-Id: I58660467ed38e70606ac727f1d82177efaa19805
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
12 years agoFix unused variable warning in QQuickItemParticle::take
Kent Hansen [Mon, 28 Nov 2011 08:41:10 +0000 (09:41 +0100)]
Fix unused variable warning in QQuickItemParticle::take

Change-Id: I7664fdc47e7f42f5eda1bfea09def0cb880f49da
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
12 years agoQDeclarativeInspectorService: Call updateStatus() in GUI thread.
Aurindam Jana [Mon, 28 Nov 2011 14:41:40 +0000 (15:41 +0100)]
QDeclarativeInspectorService: Call updateStatus() in GUI thread.

Change-Id: I8eee3df9cb1b01f220827fb278d91bc3fa4332d4
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
12 years agoFix unused variable warning in QSGContext constructor
Kent Hansen [Mon, 28 Nov 2011 08:40:34 +0000 (09:40 +0100)]
Fix unused variable warning in QSGContext constructor

Change-Id: I8b6fbc7765093e3ec98f5847d99dbb406ff71221
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoDebugger: Fix compilation error with msvc
Kai Koehne [Mon, 28 Nov 2011 13:45:22 +0000 (14:45 +0100)]
Debugger: Fix compilation error with msvc

MSVC "cannot allocate an array of constant size 0". The argument isnt
accessed anyway, so we can just pass 0 instead.

Change-Id: I3d65707148f045f2ed2779604c164297830bfe87
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoFix test cases including headers with fixed Qt version
Pekka Vuorela [Thu, 24 Nov 2011 08:55:53 +0000 (10:55 +0200)]
Fix test cases including headers with fixed Qt version

Change-Id: Id6a8e9bf732d3eab69f1ef337dde626845125507
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
12 years agoRemove unused QTBUG_21691 macros
Joona Petrell [Thu, 24 Nov 2011 09:34:09 +0000 (11:34 +0200)]
Remove unused QTBUG_21691 macros

Change-Id: I481fe67d1511d927da805e3fafe5ddd55b0ad0c7
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
12 years agoQtDeclarative: Fix warnings in tests.
Friedemann Kleint [Fri, 25 Nov 2011 07:49:45 +0000 (08:49 +0100)]
QtDeclarative: Fix warnings in tests.

- Unused parameters
- Missing interfaces
- tst_QQuickListView: Fix call canvas->rootContext()->setContextProperty
  to use a QVariant (instead of implicitly converting to QObject*)
  which was apparently intended.

Change-Id: Idc95d9408051e6f5b7005a7eccd764ac218ff867
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoAdd a getFormattedText function to TextEdit.
Andrew den Exter [Mon, 28 Nov 2011 04:03:34 +0000 (14:03 +1000)]
Add a getFormattedText function to TextEdit.

The same as getText except it include formatting tags if the TextEdit
has a rich text format set.

Change-Id: I601e8d396254ab6105aa7d105e25b14fcf69c4e5
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoRemove obsolete include from QDeclarativePixmapCache test
Jason McDonald [Mon, 28 Nov 2011 06:20:25 +0000 (16:20 +1000)]
Remove obsolete include from QDeclarativePixmapCache test

Change-Id: I5583bb8c4f98b7e1b8a7daec7a3ab53a1d931f56
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFix multiline eliding and support eliding when height is set.
Martin Jones [Mon, 28 Nov 2011 05:32:31 +0000 (15:32 +1000)]
Fix multiline eliding and support eliding when height is set.

Task-number: QTBUG-22920, QTBUG-22116

Change-Id: Ibe78ce1b0b438eec32955b986a8740f173cd082f
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
12 years agoRemove QtQuick1-specific define from declarative.pro
Kent Hansen [Fri, 25 Nov 2011 09:00:07 +0000 (10:00 +0100)]
Remove QtQuick1-specific define from declarative.pro

This only needs to be defined in qtquick1.pro; it's used
in qtquick1/util/qdeclarativeview.cpp.

Change-Id: I14dbf3e192218c6cc740295d4f575842de48dddc
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoqml debugger: Create abstraction for State management
Kent Hansen [Wed, 23 Nov 2011 11:09:15 +0000 (12:09 +0100)]
qml debugger: Create abstraction for State management

State and PropertyChanges aren't part of the core qml types. The
(general-purpose) qml debugger shouldn't have to know those types;
they are only relevant when QtQuick (2.0) has been imported.

Introduce a delegate interface that performs State processing.
Implement a delegate for QtQuick 2, and install it when the QtQuick 2
module is imported.

Change-Id: I8af1157346ca9365eb0f7b99ccb71744d17fcebc
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
12 years agoqdeclarativedebugclient: Fix flaky autotest
Kent Hansen [Fri, 25 Nov 2011 22:03:24 +0000 (23:03 +0100)]
qdeclarativedebugclient: Fix flaky autotest

The connectToHost() call can try to establish the connection directly
(synchronously), in which case the warning message will be output
before the subsequent ignoreMessage() call, causing the test to fail.

Change-Id: I08a6a7d4d090cbb942c348e0787b586c71318f99
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
12 years agoExplain the implications of QML versions a little more
Alan Alpert [Mon, 28 Nov 2011 03:11:25 +0000 (13:11 +1000)]
Explain the implications of QML versions a little more

Change-Id: I2b1667333a18daebba5224e210f219721096bc91
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoRemoved ShaderEffectItem and qt_ModelViewProjectionMatrix.
Kim Motoyoshi Kalland [Fri, 25 Nov 2011 09:01:32 +0000 (10:01 +0100)]
Removed ShaderEffectItem and qt_ModelViewProjectionMatrix.

ShaderEffectItem was replaced by ShaderEffect, and
qt_ModelViewProjectionMatrix with qt_Matrix a while ago. The old
names were kept working for a transition period, but it's now time
to remove them completely.

Change-Id: Ife030d2122250784fe2ec80b1f8645301b0165d0
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoBetter falling bear sprite
Alan Alpert [Wed, 23 Nov 2011 01:43:49 +0000 (11:43 +1000)]
Better falling bear sprite

He looked too comfortable.

Change-Id: I8de05188587c53b18639cd2dc2a011db193b7790
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoqmltestrunner reports wrong LOC for failed test cases
Charles Yin [Fri, 25 Nov 2011 01:41:04 +0000 (11:41 +1000)]
qmltestrunner reports wrong LOC for failed test cases

The callerFile() and callerLine() calls GetFrame() with incorrect index,
the right index should be the current frame index + 1.

Task-number:QTBUG-22887
Change-Id: I694073b80853bf66e02414a158c8e155f8be8390
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
12 years agoRewrite Connections signal handlers at compile time.
Michael Brasser [Thu, 24 Nov 2011 04:43:09 +0000 (14:43 +1000)]
Rewrite Connections signal handlers at compile time.

Task-number: QTBUG-22726
Change-Id: I039d54661bbf7d44912c894bf0cc1d70023a9187
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years agoDeclarativeDebugServices: Cleanup Code
Aurindam Jana [Fri, 25 Nov 2011 12:34:35 +0000 (13:34 +0100)]
DeclarativeDebugServices: Cleanup Code

Removed addEngine and removeEngine methods from services
that do not use the functions of QDeclarativeEngine.

Change-Id: Id2ddcbe8cf5706d1e4ca4b59011c7e3574cfdba8
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
12 years agoV8DebugService: Optimize Code.
Aurindam Jana [Thu, 24 Nov 2011 17:12:17 +0000 (18:12 +0100)]
V8DebugService: Optimize Code.

Replace usage of QJSEngine with V8 APIs.

Change-Id: I5221d11c1fb96a4912063d452af437a7f5bdb471
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
12 years agoRemove harfbuzz cruft from {declarative,qtquick1}.pro
Kent Hansen [Fri, 25 Nov 2011 08:20:28 +0000 (09:20 +0100)]
Remove harfbuzz cruft from {declarative,qtquick1}.pro

As of b97215b04c0bf12ecfd51ccdeaedd1fab5e8bc03 in qtbase, modules
outside of qtbase can include private text headers without depending
on the harfbuzz sources being present.

Change-Id: Idb3d70d70c1f0f194382a405daa573e66146272a
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years agoQtDeclarative: Fix building of tests on Windows.
Friedemann Kleint [Fri, 25 Nov 2011 07:27:09 +0000 (08:27 +0100)]
QtDeclarative: Fix building of tests on Windows.

Export inner classes, add missing module.

Change-Id: Iabc69ac5f08b70ade994c26d36bd08359fa71137
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
12 years agoQtDeclarative: Remove obsolete qmetaobjectbuilder-test.
Friedemann Kleint [Fri, 25 Nov 2011 07:44:51 +0000 (08:44 +0100)]
QtDeclarative: Remove obsolete qmetaobjectbuilder-test.

The test now lives in qtbase.

Change-Id: I50166795d8cae039272bc9448b9e1fc64248e10f
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoFix crash calling VisualDataGroup.setGroups during initialization.
Andrew den Exter [Fri, 25 Nov 2011 06:09:38 +0000 (16:09 +1000)]
Fix crash calling VisualDataGroup.setGroups during initialization.

A VisualDataModel's meta type is constructed in componentComplete(),
avoid accessing it before then.

Change-Id: Ic9fdfa3c458d5da3014289b777f74df87aa97103
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoFix searchs for insert positions in QDeclarativeListCompositor.
Andrew den Exter [Fri, 25 Nov 2011 03:33:09 +0000 (13:33 +1000)]
Fix searchs for insert positions in QDeclarativeListCompositor.

When scanning for a start range don't stop on ranges that don't
have an group flags unless that range is the terminal range.
This fixes a couple of issues where moving an item to the end
of the list would position it after a prepend only range instead
of before it, or would miscalculate the iterator offset resulting
in invalid indexes in the insert range.

Change-Id: Ic4aa001edf43ec86a65d432cd8f80abf0b44d276
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoRemove ints from mouse event handling.
Martin Jones [Fri, 25 Nov 2011 05:22:09 +0000 (15:22 +1000)]
Remove ints from mouse event handling.

Change-Id: Icda13ae3644dc274e08e626545df75d3e561cf87
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoAdd getText(), insert(), and remove() functions to TextEdit.
Andrew den Exter [Thu, 24 Nov 2011 02:53:05 +0000 (12:53 +1000)]
Add getText(), insert(), and remove() functions to TextEdit.

The getText() function provides access to the plain text content of a
TextEdit, and the insert() and remove() functions allow the text content
to be edited inline instead of having to assign an edited string to the
text property to make any change.

Change-Id: Id4edf0312358e2d2db45e4c649b7bd3d22f02ffa
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoImprove performance on touch event delivery.
Martin Jones [Thu, 24 Nov 2011 07:22:31 +0000 (17:22 +1000)]
Improve performance on touch event delivery.

We continuously constructed and sorted the paint ordered items for every
touch event (and paint), even though the list in most cases is identical
to the childItems list, and when it is different it rarely changes.

Detect when we can just use the childItems list directly, and otherwise
cache the ordered items list.

Change-Id: I5db0f19fc021d0c95aa6f8372ae47e6ce138d5ad
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoMake the particles benchmarks compile again
Kent Hansen [Thu, 24 Nov 2011 13:54:13 +0000 (14:54 +0100)]
Make the particles benchmarks compile again

Change-Id: Ia56fcb06ee1ef73d81288358f584cb65e3242254
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
12 years agoFix style issues
Kent Hansen [Thu, 24 Nov 2011 13:52:35 +0000 (14:52 +0100)]
Fix style issues

Make the Sanity Bot happy.

Change-Id: Idb6d7f8c758de991c60e100b76d54ad49e16212b
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
12 years agoPropegate the smooth property to the textureprovider
Gunnar Sletta [Thu, 24 Nov 2011 13:12:56 +0000 (14:12 +0100)]
Propegate the smooth property to the textureprovider

Task-number: QTBUG-22880

Change-Id: I693a44e87fb87bc92e1647f6158d23986f98623a
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoAdded test for input method selection in TextInput
Pekka Vuorela [Tue, 15 Nov 2011 11:43:16 +0000 (13:43 +0200)]
Added test for input method selection in TextInput

Change-Id: I4438625f9bb82e53bbdf173c9148f587984d7f81
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
12 years agoQDeclarativeDebugService: Crash fix
Aurindam Jana [Thu, 24 Nov 2011 12:14:21 +0000 (13:14 +0100)]
QDeclarativeDebugService: Crash fix

Query for serviceNames in registerService.

Change-Id: I570bd68c424cec696ca813a7fa1b485b64e328a4
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
12 years agoQQuickTextInput - Remove nonexisting method from header
Pekka Vuorela [Thu, 17 Nov 2011 12:34:06 +0000 (14:34 +0200)]
QQuickTextInput - Remove nonexisting method from header

Change-Id: I48aa6efec784ea3ae937636083f6ce211521bfc6
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoTextInput elements not to have tentative commit in inputMethodQuery
Pekka Vuorela [Tue, 15 Nov 2011 16:17:29 +0000 (18:17 +0200)]
TextInput elements not to have tentative commit in inputMethodQuery

Tentative commit should not be part of surrounding text, it's already
a property of the input method.
Change-Id: I64aec9763fb20770b6729f7f59dcbe23cf5a6718
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>