Andrew den Exter [Fri, 25 May 2012 02:32:28 +0000 (12:32 +1000)]
Don't parent (QObject) delegate items to views.
This keeps object ownership within the context the items were created
in and simplifies lifetime management as the VisualDataModel has sole
license to delete objects and doesn't have to keep guards against a
view and all it's children being deleted.
Delegates are still reparented in the item heirarchy.
Change-Id: Ife5afdfe294a5a8ca1ca3638a086f72452e4915c
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Martin Jones [Fri, 25 May 2012 03:28:22 +0000 (13:28 +1000)]
Flickable containing MultiPointTouchArea is unresponsive following touch.
MPTA was releasing the mouse grab when all touches were
released, causing the mouse release event to not be propagated
to its parents, who were then unable to correct their state.
Remove this code and allow the normal event handlers to do their
thing.
This is the same fix as was implemented for PinchArea in
9634dc440269fc03f825a6d18b371d8e612ba9ec
Change-Id: I2715677157f5838e3f81137f64765024cf2f0459
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
Robin Burchell [Fri, 25 May 2012 13:30:47 +0000 (15:30 +0200)]
Add --resize-to-root option, sets ResizeViewToRootObject on the qmlscene view.
Sometimes it is useful to be able to resize a view from within QML, for example,
when writing QML which must operate in both portrait and landscape conditions.
Change-Id: I10564bb3c8661fae6c1d175985268a409dc3dafd
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Chris Adams [Fri, 25 May 2012 07:23:42 +0000 (17:23 +1000)]
Fix crash caused by unregistered enum types
If the enum type isn't registered with Q_ENUMS, the metatype lookup
fails, which results in a crash in certain circumstances.
This commit ensures that when assigning an undefined value to an
unregistered-enum-type property, no crash occurs.
Change-Id: I0b539b591c9c9d6262c748300e4f4b6813d4f9a6
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Bea Lam [Fri, 25 May 2012 07:33:02 +0000 (17:33 +1000)]
Don't override "z" bindings for header and footer
Headers and footers are given a default z value. This value
should be set between Component beginCreate() and completeCreate()
to avoid overwriting any binding in the header or footer item
that has already set the 'z' value.
Change-Id: I8e3ee97232d99500a32f2d77d2b663016eb404f7
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Aaron Kennedy [Fri, 25 May 2012 10:40:56 +0000 (11:40 +0100)]
Store QQmlMetaObject in V4
d2e557c2c2d7fcf3bf7c1676df3902e115986dc2 caused a regression where V4
would not handle bindings as the meta object wasn't correctly stored in
the IR.
Change-Id: Id0af2175c15db69de9108060ff4901d0003de67b
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Andrew den Exter [Fri, 2 Mar 2012 02:58:45 +0000 (12:58 +1000)]
Don't deliver drag move events immediately.
Rather than delivering drag move events everytime the position of an
item changes queue up an event to process in the event loop. This
filters out noisy intermediate positions particularly where the x and
y values are set independently and better insulates against feedback.
Change-Id: I5d787d63ed01441a9080d0daaee9db1373d5f073
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Aurindam Jana [Fri, 25 May 2012 08:14:53 +0000 (10:14 +0200)]
QQmlEngineDebugService: Property Data of type QVariant
Send property data of type QVariant to the client.
Change-Id: I5a18da18f1347935e4ccaafb05e3a877e73bbede
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
Andrew den Exter [Thu, 5 Apr 2012 04:37:46 +0000 (14:37 +1000)]
Optimise QQuickItem::stackAfter/Before() for the common case.
These functions are most often used to position items just given a new
parent, meaning one item is very likely to be at the end of the
child list, and when appending multiple items the other is also likely
to be near the end. When this is true we can save a lot of time
spent iterating to the end of the list by doing a reverse search.
Change-Id: If16d6d19689a6140d3d9a873857776cf79666910
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Andrew den Exter [Thu, 5 Apr 2012 01:33:59 +0000 (11:33 +1000)]
Don't leak unresolved items when a VisualDataModel is destroyed.
Clear the unresolved flag items on destruction of the model, otherwise
the flag will hold a reference and prevent the item being destroyed.
Change-Id: Ic67daf9cbb5676f7b55f6286baaaa3b5feb9fd3e
Reviewed-by: Bea Lam <bea.lam@nokia.com>
Andrew den Exter [Wed, 4 Apr 2012 07:26:22 +0000 (17:26 +1000)]
Add an v8 object template for visual data model change sets.
This is more optimal than dynamically creating an object per
change for each signal emission. Also create static string
instances for property names common to all item objects.
Change-Id: I8b0a6b683df4ee9c55c15cc928603e82f37045f7
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Roberto Raggi [Fri, 25 May 2012 07:45:24 +0000 (09:45 +0200)]
Don't rewrite the body of function expressions
That is, don't look inside function expressions when rewriting
bindings as closures.
Task-number: QTBUG-25901
Change-Id: Ia4b99d3c58c4482e9505cf2461bd14942a9a00ca
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Kim Motoyoshi Kalland [Wed, 11 Apr 2012 15:39:46 +0000 (17:39 +0200)]
Simplify the depth transformation in the scene graph.
Use default depth function GL_LESS and depth clear value 1, and
set the near and far clipping planes to -1 and 1. This change
will make the transformations a bit easier for people who
implement custom 3D geometry since [-1, 1] is the typical z-range
after a projection transformation. The change has no visual impact
on 2D geometry.
Change-Id: I75d4a8acc15131ffaa5d13a749e42dffbc1d09db
Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Chris Adams [Mon, 21 May 2012 23:52:57 +0000 (09:52 +1000)]
Remove exceptions support from QtQml
Previously, the sequence wrapper handled std::alloc exceptions.
This commit removes that handling, as there are many other ways
to use up all of the available address space memory which aren't
handled (eg, loading lots of large images), and exception support
causes a large overhead.
See
a1151929fffc765e128d72d170342020b34dd0b3 for more information.
Change-Id: I68c9d7744e7dcece7b3112352e01ac71ead12f62
Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Charles Yin [Thu, 24 May 2012 04:08:20 +0000 (14:08 +1000)]
Add more RETURN_IF_DELETED checking in animation code
Change-Id: I5f77cdc7a6bede547119b2a0b59b41d27cfc401a
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Matthew Vogt [Fri, 25 May 2012 00:01:21 +0000 (10:01 +1000)]
Ensure cached moduleName matches when avoiding conversion
Multiple plugins can have their module strings loaded at the same
logical address, so simple comparison of the string addresses fails
between multiple plugins.
Change-Id: If0bcbaaafa595e9581db1f3e480f7b1bffbae101
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Aaron Kennedy [Thu, 24 May 2012 13:28:13 +0000 (14:28 +0100)]
Don't access metaobject unnecessarily
Otherwise any lazy meta objects will need to be created.
Change-Id: I5895618ddf3344547e739c4b22ad637b26d521ad
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Aaron Kennedy [Wed, 23 May 2012 15:01:21 +0000 (16:01 +0100)]
Use static dispatch tables for QQmlAbstractBinding
This saves us the space of the virtual table pointer, but does
somewhat limit us to the 4 QQmlAbstractBinding types that we
have today.
Change-Id: I03d06ef2ec0c51271c28e7a5aab6dc689d369da4
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Aaron Kennedy [Wed, 23 May 2012 10:38:46 +0000 (11:38 +0100)]
Reduce size of QQmlAbstractBinding
The doubly-linked list is unnecessary. Most bindings are created at
startup, and removed only when the object is destroyed. In these cases
the double-link buys nothing other than wasted space. Even when the
bindings are removed earlier, searching the list is not that slow.
Change-Id: I22e1376b78ba712dafd171c7447fbc6ed212b891
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Aaron Kennedy [Fri, 18 May 2012 10:11:40 +0000 (11:11 +0100)]
Reduce size of QQmlNotifierEndpoint
Change-Id: I4d4a22f5f3d88d4ad2fcd738753fd8da2d8a9263
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Gunnar Sletta [Wed, 23 May 2012 11:06:06 +0000 (13:06 +0200)]
Reenable QQuickTextEdit::delegateLoading for Mac OS X
The render loop has been rewritten and the crash is no longer
reproducable.
Change-Id: I1402f7875075e4e552f7c430bbf1ca833d8dc601
Reviewed-by: Gatis Paeglis <gatis.paeglis@nokia.com>
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
Nico Vertriest [Fri, 18 May 2012 13:19:55 +0000 (15:19 +0200)]
Doc: Sanitized QML types
-modified \brief
-checked QML modules
-added qml directory to the qdocconf file
-added particles directory to the qdocconf file
Change-Id: I589e32d3106cda37c7fa4d55a941afd9876fc2b2
Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
Kent Hansen [Thu, 24 May 2012 08:15:36 +0000 (10:15 +0200)]
Update license headers
Change-Id: Ica6a0d62697ec6ef626280ca203b6f6839f64d81
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Kent Hansen [Wed, 23 May 2012 21:04:52 +0000 (23:04 +0200)]
Simplify method name extraction in property cache
All of Qt is now generating r7 meta-objects, so the compat support
can be removed.
Change-Id: Ib8e697b86a0ae8a68209fe661a8043505838f631
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Aaron Kennedy [Fri, 11 May 2012 11:01:41 +0000 (12:01 +0100)]
Lazily create QMetaObjects
For internal QML built types, creating a metaobject each time is
just wasteful. Additionally, as the property caches were always
created from the intermediate QMetaObject, it was difficult to pass
information directly from the compiler to the property cache.
Change-Id: I769526b0edaaf16a86883f3065b75618b94e4077
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Samuel Rødal [Thu, 24 May 2012 10:15:25 +0000 (12:15 +0200)]
Check ThreadedOpenGL support before enabling threaded renderer.
BufferQueuedOpenGL doesn't necessarily imply threading support.
Change-Id: I4ba8e3b9acfd3eb12bb41aa6b644c852ae5fa1c6
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Simjees Abraham [Wed, 23 May 2012 11:57:56 +0000 (13:57 +0200)]
Debugger : Handling destruction of multiple elements.
Changes made to handle the case where multiple elements are
removed in the editor and saved when "Apply on Save" is active.
The respsonse is sent with the correct Id.
Change-Id: I76dc1487a0a5ebf859d2ef54cc64a4a5fc4008ca
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
Simjees Abraham [Tue, 22 May 2012 12:01:16 +0000 (14:01 +0200)]
Debugger: Removing the deleted objects from objectReferenceHash
The invalid entries from objectReferenceHash in QQmlDebugService
is removed once the Qml object is destroyed.
Task-number: QTCREATORBUG_7451
Change-Id: I8d2ccafe81a811ea319f13fd99fbde3c13e6b2be
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
Kent Hansen [Wed, 23 May 2012 21:09:15 +0000 (23:09 +0200)]
Fix the logic in void return type check
Since the introduction of QMetaType::UnknownType, QMetaType::Void no
longer has value 0. Hence, the optimization in this code (avoiding
return type construction/passing/conversion when the return type is
void) was "lost".
Change-Id: I32313f8287c4f0e01fee3c2b4ba722f31457242c
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Andrew den Exter [Thu, 17 May 2012 04:38:33 +0000 (14:38 +1000)]
Make qqmlmoduleplugin tests pass in shadow builds.
The plugin binary and qml files for a module need to be in the same
directory. This was solved for source builds because the files were
already located in the import path, but with shadow builds the files
were split between the build and source trees. To solve this we copy
the files to the import path when doing a build. So no files are
copied on top of themselves all mixed module files have been relocated
to their module source directory.
Change-Id: I238af998a0f766e67ed6d0023e5ab4c2a4ea67af
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Kent Hansen [Tue, 22 May 2012 13:30:11 +0000 (15:30 +0200)]
Remove QJSEngine::ContextOwnership and associated constructor
This API was intended for QtWebKit integration, but we decided to
keep it out of the public headers and introduce it in a different
way later.
Change-Id: I7f30b20b741eca8569e63a7e4e27171d75293567
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Kent Hansen [Tue, 22 May 2012 13:13:08 +0000 (15:13 +0200)]
Remove QQmlEngine::collectGarbage() overload
QQmlEngine inherits from QJSEngine, which has a collectGarbage()
function that does exactly the same.
Also remove doc references to non-existing function
reportAdditionalMemoryCost().
Change-Id: Iff12d2cf940f3afcd88967eb9a841c2f6082ca37
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Bea Lam [Thu, 24 May 2012 05:34:59 +0000 (15:34 +1000)]
Remove duplicated doc files and images
- Remove doc/ files which were duplicated under src/quick/doc and
src/qml/doc
- Remove duplicated images under src/doc/qml/images which were already
under src/doc/quick/images
- Merged
0102413396c91e97ed856235cd1a52f7185c4862 and
3b04bbde6356797368114fce1b45b85271e9fed8 which made it into doc/src
but not src/qml/doc
Change-Id: I275b7d29f9fc2222dcf801c257c1f67b5880446b
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Martin Jones [Fri, 18 May 2012 01:52:17 +0000 (11:52 +1000)]
Optimize QML enum resolution
Change-Id: Ibc9ffe882045adf1c1149601c3499e31b9393eeb
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Andrew den Exter [Fri, 11 May 2012 07:37:07 +0000 (17:37 +1000)]
Enable binding to properties of type QJSValue.
This allows javascript objects of all types to be bound to properties
declared in c++. Compared to a QVariant the primary benefit this offers
is a type which functions and objects with functions can be bound to.
Change-Id: Idb3313e7ff1d616ab12d44f616083c8296201f3a
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Andrew den Exter [Wed, 23 May 2012 04:58:13 +0000 (14:58 +1000)]
Fix crash in VisualDataModel drag selection example.
The crash was an assert on an invalid pre-condition, and that's simply
been removed. But it did highlight another issue when moving items
due to separate code paths for iterating forwards and backward in
a composited list. Basically when iterating backwards because we're
looking for the first instance of an index it's necessary to overshoot
a little to an index prior and then iterate forwards, and as such
there's little difference between iterating forward or backwards.
Change-Id: I6252e3e0170dc2c72d0204137c69275c8ccc519b
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Andrew den Exter [Thu, 24 May 2012 00:55:06 +0000 (10:55 +1000)]
Fix performance regression in VisualDataModel.
Restore assignment of the shared property cache to individual items
created.
Change-Id: I7d4bc0253d644e07a8803f47b3afabaa8ef47146
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Andrew den Exter [Mon, 2 Apr 2012 03:20:04 +0000 (13:20 +1000)]
Contruct per-delegate QQmlContextData directly.
The QQmlContext object created per item is a weighty (QObject) wrapper
around QQmlContextData that isn't utilized except as an intermeditrary
for the QQmlComponent API. By duplicating a little code out of
QQmlComponent we can avoid the need to ever contruct the wrapper.
Change-Id: I74558c7e746ead2c5127a8754d5f04550b8f4d10
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Andrew den Exter [Wed, 28 Mar 2012 07:42:32 +0000 (17:42 +1000)]
Don't construct VisualDataModel attached properties unless requested.
This saves allocating a QObject per item model in the common case.
Change-Id: I0e77e6c6c0c64ac6c5e482ef55e194c68e778b32
Reviewed-by: Bea Lam <bea.lam@nokia.com>
Matthew Vogt [Wed, 23 May 2012 05:52:31 +0000 (15:52 +1000)]
Ensure that main thread processes worker data events
If the main thread goes into a wait for the worker thread before
the worker thread posts the event that triggers the main thread to
process generated data, deadlock results.
Change-Id: I3788acef73e82aa96f2b86bcb48933d01ae86841
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Martin Jones [Fri, 18 May 2012 05:53:51 +0000 (15:53 +1000)]
Optimize qmldir parsing
From 840K instr to 340K instr for large project.
Change-Id: Ib1e4d5ea94001b6650211b96f262db28a05d8260
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Martin Jones [Fri, 18 May 2012 04:24:59 +0000 (14:24 +1000)]
Optimize QML parser
Inlining and faster number parsing. Reduces parsing of large
project from 20.5mil instr to 19mil instr.
Change-Id: I83aff3eaf03fd19b07f5e84ec6f9d17b7f0cb931
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Matthew Vogt [Wed, 23 May 2012 22:55:39 +0000 (08:55 +1000)]
Ensure QQuickView's engine outlives the root component
If the engine is destroyed before the root component, assumptions of
resource availability are broken.
Change-Id: I7fe27ff38ae3c215d58fb8811aff449b6c1f7b5b
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Matthew Vogt [Wed, 23 May 2012 06:12:44 +0000 (16:12 +1000)]
Remove default parenting in Qt.createComponent()
Remove the default parent applied to component instances created by
Qt.createComponent(). This allows these objects to be managed by usual
JS reference management, and thus to be appropriately garbage
collected.
Task-number: QTBUG-24841
Change-Id: I29efbb9d8f5a2ef4c74415399fa3024e6590004b
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Alan Alpert [Tue, 22 May 2012 07:27:23 +0000 (17:27 +1000)]
Organize data members in QQuickParticleData
Change-Id: Ibf14dc0f9ef9e17225f07f31276085c9ca83d4f1
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Michael Brasser [Fri, 18 May 2012 03:03:22 +0000 (13:03 +1000)]
Remove deprectated MultiPointTouchArea signals.
Change-Id: Icea6d17704b2ddb7917bc0c0fea11dd625562685
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Martin Jones [Fri, 18 May 2012 00:54:09 +0000 (10:54 +1000)]
Optimize QML type registration.
Change-Id: I981f5e2e6d7f6089e9f326d41a65e54668b73120
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Charles Yin [Thu, 3 May 2012 01:36:36 +0000 (11:36 +1000)]
Introduce a new constructor to QQuickView
Make it possible let QQuickView use an existing qml engine
and multiple QQuickView objects can share one QQmlEngine instance.
Change-Id: I035d1c15155be22f1131b504c40cf4ffb5da0f45
Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
Charles Yin [Tue, 22 May 2012 01:37:50 +0000 (11:37 +1000)]
Add unit tests for SVG path
Change-Id: I4358416ccf973940fbd54633254274ba0a18e777
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Rohan McGovern [Wed, 23 May 2012 00:20:10 +0000 (10:20 +1000)]
Removed CONFIG+=parallel_test from suspected parallel-unsafe test [2]
This test has failed a parallel stress test and may contribute to
instability in test runs.
Change-Id: I7db5313078f3b3b9a7ae59facd5dbcb03777e7b8
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Charles Yin [Fri, 18 May 2012 02:04:17 +0000 (12:04 +1000)]
Only preallocate 1 change listener per animation instance
In most cases, only one animation change listener is added to animation instance,
so change QPODVector's Increment parameter from 4 to 1 can save 24 bytes (8 bytes for each listener) per animation instance.
Change-Id: Iaf50016899963689f2bf84c3dd14fcd05c306d21
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Charles Yin [Thu, 17 May 2012 04:43:43 +0000 (14:43 +1000)]
Add completeToBeginning()/completeToEnd() to animation controller
Change-Id: I1abac96754cc82c8e0e00c58a27c09b68c5075c1
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Charles Yin [Tue, 22 May 2012 06:14:27 +0000 (16:14 +1000)]
Use the default timeout for tryCompare
Even with this fix, the test still fails in CI,
so mark this test as insignificant until we figure out the real reason.
Change-Id: Idd07820c63b0c9627c86ed87f97b5ade6a552f7e
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Gunnar Sletta [Wed, 16 May 2012 18:16:07 +0000 (20:16 +0200)]
Add QQuickCanvas::update()
We would like to make a distinction between QQuickItem::update()
which triggers updatePaintNode() to synchronize the scene
graph and requesting the toplevel QQuickCanvas to be repainted.
If we have this distinction in place it is possible for the
scene graph to detect that the scene is unchanged and avoid
rendering unless the user has explicitely asked for the
canvas to be repainted, which is often the case when hooking
into QQuickCanvas::beforeRender().
Change-Id: Ibe77f58423593deb217ef9f8082fa12009f45daf
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Gunnar Sletta [Tue, 22 May 2012 12:14:11 +0000 (14:14 +0200)]
Reexport the shader effect texture
Change-Id: I4fd2b40bc2ed6bb977cb410a4822517f750f53ff
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
Jan-Arve Saether [Tue, 22 May 2012 07:04:59 +0000 (09:04 +0200)]
Replace (un)checkAction with toggleAction (2/3)
Needed in order to finalize the replacement of {check,uncheck}Action
with toggleAction.
Change-Id: I7328275aa86cf4e8dc093f86597529b41fefd4a6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Friedemann Kleint [Mon, 21 May 2012 10:38:46 +0000 (12:38 +0200)]
QtDeclarative: Fix warnings about deprecated QCoreApplication::translate().
Change-Id: I4abd4ee98ca9d4267c5ad71d3b9c2e7d5de60902
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Friedemann Kleint [Tue, 22 May 2012 06:28:04 +0000 (08:28 +0200)]
Quick/QQuickFontLoader: Output warning on failure.
Helps in case the 'file::' prefix is missing from local file URLs
on Windows. 'C:\foo' is then interpreted as URL with protocol
'c', causing an error.
Change-Id: I252ab453a7ce241f3bd290ef59d3106110146662
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
Jerome Pasion [Tue, 22 May 2012 10:04:25 +0000 (12:04 +0200)]
Doc: Added two new articles for the QML documentation
-for the new documentation structure
Change-Id: I5b047fb47e479eb1ae25bd44f8e29b6b705f1b83
Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
Jan-Arve Saether [Tue, 15 May 2012 12:26:09 +0000 (14:26 +0200)]
Accessibility: Implement invisible and checkable state
Change-Id: I3a079b4171e611b0136ef1582f6f16f71cf8f340
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Charles Yin [Mon, 21 May 2012 04:50:40 +0000 (14:50 +1000)]
doc fix
renderTarget/renderStrategy property type should be enumeration.
Change-Id: I454c5c1d7b5be8290a25b81f8a9b9a54ebf515ec
Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
Alan Alpert [Mon, 14 May 2012 03:52:41 +0000 (13:52 +1000)]
Examples cleanup
Rename calculator/CalculatorCore to calculator/content for consistency.
Also fix license headers in calculator and samegame to be the examples
license instead of the source license.
Change-Id: Ia2254fcd7cce1114199921ede91bf8f032058f77
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Rohan McGovern [Mon, 21 May 2012 22:45:27 +0000 (08:45 +1000)]
Removed CONFIG+=parallel_test from suspected parallel-unsafe tests
These tests have failed a parallel stress test and may contribute to
instability in test runs.
Change-Id: I8d82e9df7df6cac374b8b2eda43de8e96b676972
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Simjees Abraham [Mon, 21 May 2012 12:22:08 +0000 (14:22 +0200)]
Debugger: Response for DESTROY_OBJECT request sent correctly
The response for request DESTROY_OBJECT is sent after the
object has been destroyed. This enables the creator to
sync the objects tree displayed for debugging.
Change-Id: Icedaf92df4402f067fd5b8590811c770e4b9063e
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
Jędrzej Nowacki [Fri, 18 May 2012 15:21:09 +0000 (17:21 +0200)]
Simplify a type name query.
QVariant::typeToName is calling QMetaType::typeName and returns the same
data.
Change-Id: I4028f54ef318292e27eaa0e6981ea114e6e6cd52
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Jędrzej Nowacki [Fri, 18 May 2012 15:30:03 +0000 (17:30 +0200)]
Simplify QVariant::convert and QVariant::canConvert calls.
QVariant::Type casts are not necessary in Qt5.
Change-Id: Ia2e7d8fa367a59c23bd06993db36d96a0a46a229
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Friedemann Kleint [Mon, 21 May 2012 10:41:37 +0000 (12:41 +0200)]
QtDeclarative: Fix warning about construction of a QString from ASCII.
Change-Id: I893fc4cb9741ec930e35fabdc9bdccca0e467e5e
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Friedemann Kleint [Mon, 21 May 2012 11:41:43 +0000 (13:41 +0200)]
QtDeclarative: Fix warnings about uninitialized variables.
Change-Id: Ie918f1e813b243b250cedfc2e94e9c66288d08e3
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Martin Smith [Mon, 21 May 2012 09:05:11 +0000 (11:05 +0200)]
doc: Added missing qdoc text
A \table command was not matched by a
\entable command, and the qdoc comment
for one \qmlproperty command was not
terminated, so that a second \qmlproperty
command appeared in the same comment.
Change-Id: I398e8afd1dba84a74b62b6881990de81070c24b7
Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com>
Laszlo Agocs [Mon, 21 May 2012 06:30:07 +0000 (09:30 +0300)]
Null out the d pointer in QQuickMouseEventEx dtor
Otherwise every single app will assert in ~QEvent when
QML_TRANSLATE_TOUCH_TO_MOUSE is enabled.
Change-Id: Ib0590a980cb00b913ec096bcdfba57fffaa19eb1
Reviewed-by: Shawn Rutledge <shawn.rutledge@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Simjees Abraham [Wed, 16 May 2012 13:20:59 +0000 (15:20 +0200)]
Qml : Resetting binding corrected
Resetting the binding for property corrected in case the property is
nested (eg: font.bold)
Task-number: QTCREATORBUG-6294
Change-Id: I39cca54c17860c4e6df1cf864cc2f70214d50c8f
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
Andrew den Exter [Fri, 18 May 2012 06:07:52 +0000 (16:07 +1000)]
Fix crash in QQuickVisualDataModel test.
"item" + 1 will not concatenate.
Change-Id: Icea095fd3183ba1b0e9b0e19b0c1fb6758f39ff3
Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
Kim Motoyoshi Kalland [Fri, 18 May 2012 12:23:29 +0000 (14:23 +0200)]
Always emit signal after ShaderEffectSource::scheduleUpdate().
The scheduledUpdateCompleted signal was originally added so that
you can take some action after updating a ShaderEffectSource with
scheduleUpdate(). However, before this commit, the signal would
not be emitted if the ShaderEffectSource was already up-to-date.
Instead, the signal would be delayed until the next time the
ShaderEffectSource was redrawn. This commit ensures the signal is
emitted even if the ShaderEffectSource is already up-to-date.
Change-Id: Idd22cdea1f7c14ed7a45081c98b8cfbef896dccd
Reviewed-by: Kim Gronholm <kim.1.gronholm@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Kim Motoyoshi Kalland [Fri, 18 May 2012 11:53:27 +0000 (13:53 +0200)]
Remove unused variable.
Change-Id: I49fee9c96a9f1b54a790d2dd8a3d1f0a3c7f8a5a
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Matthew Vogt [Mon, 21 May 2012 03:40:22 +0000 (13:40 +1000)]
Ensure repeated compilation does not fail
Failure could result from the allocation of an address previously used
for the same class. The test is repeated for a surprisingly large
count of repetitions to increase the chance of this occurring.
Change-Id: I045902c50021f23adbbd61fccf41b9c38657387a
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Kent Hansen [Wed, 16 May 2012 06:58:37 +0000 (08:58 +0200)]
Detect and abort if an object is deleted during signal handling
If an object gets deleted while one of its own signal handler
expressions is being evaluated, a subsequent crash is inevitable.
While we could introduce guards/checks in the signal handler kernel
(QMetaObject::activate(), QQmlNotifier::emitNotify() and friends) to
detect and mask the sender deletion, this arguably isn't helpful; the
code that emitted the signal is likely to access member variables
directly after emitting the signal, causing semi-random crashes.
This situation is a symptom of misbehaving application code. Catch it
early rather than later, and issue a qFatal() with a helpful message.
Coupled with a backtrace, this should make it easier to track down
the flawed C++ application logic.
Change-Id: I8c77800e49c475def613224f208181c2d0af60e6
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Jerome Pasion [Wed, 16 May 2012 14:15:57 +0000 (16:15 +0200)]
Doc: Moved and added Qt Quick and Qt QML documentation.
-moved the documentation to separate aspects:
QML the language
QML engine
QML bindings
-fixed landing page for Qt Quick
-removed duplicate module pages
-added content as a base structure
-added Qt QML source in the Qt Quick module documentation
Part of QTBUG-25689
Change-Id: Ib12ceedfbd689a9f764a91e669bc7c2a433643aa
Reviewed-by: Peter Yard <peter.yard@nokia.com>
Reviewed-by: Bea Lam <bea.lam@nokia.com>
Samuel Rødal [Sat, 19 May 2012 11:19:09 +0000 (13:19 +0200)]
Fixed missing repaints with threaded renderer.
Update when we get an expose event, like the trivial renderer does.
Change-Id: Ib95559da35b94d84c0935c6abb24fdfb1e05fa1c
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Andrew den Exter [Wed, 28 Mar 2012 06:30:50 +0000 (16:30 +1000)]
Improve detection of deleted VisualDataModel items.
The data object for each delegate object has a pointer guard with a
virtual objectDestroyed() function, that's a better tool for detecting
deletion than the destructor of a child object.
Change-Id: Iad1516e3daeb5e019ece6c3b2eb65da768cf43cb
Reviewed-by: Bea Lam <bea.lam@nokia.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Andrew den Exter [Wed, 28 Mar 2012 05:28:33 +0000 (15:28 +1000)]
Initialize VisualDataModel v8 object constructor on demand.
Avoid allocating data that isn't needed.
Change-Id: I6f1d55f535599516a8b5e711f977e81afd337bd6
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Andrew den Exter [Fri, 16 Mar 2012 05:37:14 +0000 (15:37 +1000)]
Refactor QQuickVisualAdaptorModel to reduce memory consumption.
Don't inherit from QObject.
Use a single QQmlGuard for all model types, and reset the model
property if the model is deleted.
Construct v8 object template on demand.
Store model type specific data in a separate class that is allocated
on demand.
Change-Id: Id4f7b235741555b6ffba3fcf11727d85d6920e9e
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Matthew Vogt [Tue, 15 May 2012 06:56:40 +0000 (16:56 +1000)]
Allow the existence of a VME metaobject to be asserted
Test for the existence of a VME metaobject. Otherwise, assertion of
a static cast result is not meaningful.
Change-Id: Ic9e9c38e5dce65c41d20e405c33e179334c37b00
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Chris Adams [Fri, 18 May 2012 03:23:09 +0000 (13:23 +1000)]
Remove dead code from QQmlNotifierEndpoint
The copyAndClear() function is unused and untested.
Change-Id: I75cece92e4af691c03c6b7251be3182fa10cfe6c
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Michael Brasser [Mon, 14 May 2012 05:51:28 +0000 (15:51 +1000)]
Improve memory usage of Connections and signal handlers.
Following the pattern of
330152354aed8496ac78d145e14b25ee2d7bf8fb, store
the source as Utf8. Keep one less copy of the source when possible.
Change-Id: Ifa5f5fdc9ea3d48e904489dc262145eff36e710c
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Andrew den Exter [Thu, 17 May 2012 06:50:44 +0000 (16:50 +1000)]
Remove QSKIP from test.
Fix merged in qtbase.
Task-number: QTBUG-24801
Change-Id: I41de3b20938bd63861fba14a43b23ed8d91414d5
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
Matthew Vogt [Mon, 14 May 2012 23:02:09 +0000 (09:02 +1000)]
Remove unnecessary exports
Reduce library load time by removing any exports which are not required
by existing clients.
Task-number: QTBUG-24768
Change-Id: Ia5754d6f97bb2ed46e290820a5b092f85a4bc5b0
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Yann Bodson [Wed, 16 May 2012 02:59:32 +0000 (12:59 +1000)]
Add optional width and height arguments to mapToItem()/mapFromItem()
When specifying the width and height from QML, mapToItem()/mapFromItem()
will use QQuickItem::mapRectToItem (and mapRectFromItem).
Task-number: QTBUG-25755
Change-Id: Iae87671913623969d7428dd008afaa6faf3faf33
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Martin Jones [Wed, 16 May 2012 07:49:32 +0000 (17:49 +1000)]
Optimize type resolution
Faster qmlType() and resolveType() lookup.
Change-Id: I096439f23bf6071e8bfdf0cda366cc71e00293ba
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Chris Adams [Thu, 17 May 2012 03:40:50 +0000 (13:40 +1000)]
Improve composite property type unit test
Previously, the test ensured that the (variant) value returned by
QQmlProperty::read() was identical to that returned by
QMetaProperty::read(), which isn't the case if an engine is passed
to the QQmlProperty constructor. This commit expands the unit test
to ensure that the actual QObject-ptr value is identical, rather
than the variant value (which may have differing type information),
regardless of whether an engine is passed in or not.
For list properties, the individual values are (in general) not able
to be accessed, and so the unit test for list properties is relaxed.
Change-Id: Iec40dca147a0bb793359b28facbcae69cc49c1ad
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Matthew Vogt [Thu, 3 May 2012 22:32:45 +0000 (08:32 +1000)]
Add QQmlEngine::trimComponentCache()
Allow unused data in the engine's component cache to be safely discarded
so that the memory can be freed for other purposes.
Unloading of scripts that are no longer required after trimming unused
components is not yet supported.
Task-number: QTBUG-25653
Change-Id: I37bc9d5592eeb5edceeb34d010a555dcffd11cea
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Michael Brasser [Wed, 16 May 2012 02:31:59 +0000 (12:31 +1000)]
Fix signal handlers for signals with default arguments.
For cloned signals, connect to the index of the original. This was a
regression caused by the switch to QQmlNotifierEndpoint for signal
handlers. This change also makes parameters with default arguments
available from QML, while previously they were unavailable.
Change-Id: I1feb3412c3e9b0f2a5d6644c404c56d53c5544ac
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Charles Yin [Wed, 9 May 2012 06:01:51 +0000 (16:01 +1000)]
More defense programming in animation code
1. Add more deletion checkings in animation job code
2. Add some more asserts
Change-Id: I34772792ea4638b61eb2c3d65da5d35ce75183d7
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Andrew den Exter [Wed, 16 May 2012 23:35:34 +0000 (09:35 +1000)]
Skip failing test.
Fix in qtbase can't be merged until the QEXPECT_FAIL's are removed.
Change-Id: Id416627cce3074549eda13331b7a88cc0313a910
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
Andrew den Exter [Wed, 16 May 2012 06:07:47 +0000 (16:07 +1000)]
Fix incorrect text alignment in TextEdit.
QTextDocument always spans the full width of a TextEdit so the text
node shouldn't be offset by the x position of the bounding rect.
Change-Id: I882a44baeea4d054279cadc5632df6d8863caea1
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
Charles Yin [Wed, 16 May 2012 06:05:06 +0000 (16:05 +1000)]
Only genereate new texture if texture id is 0
Otherwise a new texture would be created for accessing textureId()
function everytime and even worse thing is these textures will never
been deleted and eventually cause gl out of memory.
Change-Id: I349fcf15b5aeabbd9420a8dd645e0fdcc1d256bf
Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
Debao Zhang [Tue, 24 Apr 2012 03:22:22 +0000 (20:22 -0700)]
Using QStringLiteral or QLatin1String instead of QLatin1Literal
Change-Id: Ie1435f1ac5c81d8781e7118121ed07c7202ab124
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Gunnar Sletta [Wed, 16 May 2012 12:41:30 +0000 (14:41 +0200)]
Removed ### from scenegraph
Change-Id: I6b114938d2c52df95469975ffa87449f7fd8c647
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
Jan-Arve Saether [Tue, 15 May 2012 13:01:23 +0000 (15:01 +0200)]
Accessibility: Do not look for the "text" property as a last resort.
This does not work very well with items where the text property
is just an alias to the concrete property on a child item.
The screen reader might then read aloud the text twice, one for the
item with the alias, and another time for the child item.
Change-Id: I11764c2988b1b3b10b6d80ed8978ef2191d51097
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Jerome Pasion [Wed, 16 May 2012 13:24:34 +0000 (15:24 +0200)]
Local Storage: Moving local storage documentation from doc to src
-A submodule of QtQuick, moving to src/quick/doc/src/localstorage
Change-Id: I394ceacac695e17b656339445c22450cea973e95
Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
Martin Jones [Wed, 16 May 2012 00:34:19 +0000 (10:34 +1000)]
Document the dangers of executing the event loop in QML API
Change-Id: I0294dd85fcc60615240a33c6e4a108fbde17a4bc
Reviewed-by: Bea Lam <bea.lam@nokia.com>