Aaron Kennedy [Fri, 1 Jun 2012 14:07:54 +0000 (15:07 +0100)]
Fix crash in lazy meta object generation.
Inside the property cache, override data can only handle overrides
pointing to either a method or a property, but not to a signal
handler. This is a bug in itself, but has never come up before due
to no one following override data on methods. When this
was changed by
d2e557c2c2d7fcf3bf7c1676df3902e115986dc2, this bug
was exposed.
This change doesn't actually fix the underlying problem, but it does
restore exactly the same behavior we had previously. The complete
fix will come in a later change.
Change-Id: I6a890e6ca1e40735da8158b21dfe38dc88091081
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Charles Yin [Fri, 1 Jun 2012 23:59:49 +0000 (09:59 +1000)]
Fix resizing of Canvas item that use FBO as renderTargets.
Change-Id: I2a158e7838f637a662700290f9f4fd28ca726d1e
Task-number: QTBUG-25992
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Kim Motoyoshi Kalland [Thu, 31 May 2012 13:28:28 +0000 (15:28 +0200)]
Fix resizing of QQuickPaintedItems that use FBOs.
Task-number: QTBUG-25472
Change-Id: Icc8d0f93841a76bbc92d09e0bf96f147ac64a8c6
Reviewed-by: Yoann Lopes <yoann.lopes@nokia.com>
Morten Johan Sorvig [Fri, 1 Jun 2012 09:24:04 +0000 (11:24 +0200)]
Don't swap buffers before the window is exposed.
At app startup there is often a delay between setting
a window visible and the window being exposed by the
window manager.
Add check to canvas->isExposed() before calling
swapbuffers.
Change-Id: I5e588ab334a72c4fe817da44eff4c3dc785d6b1f
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Girish Ramakrishnan [Thu, 31 May 2012 21:21:27 +0000 (14:21 -0700)]
doc: Fix typo
Change-Id: Ie693d28515e3d524024ef79377ade5a030c8b147
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Kent Hansen [Wed, 30 May 2012 11:45:42 +0000 (13:45 +0200)]
Remove dead code
Change-Id: If93723e48e1088d1e0664b315058803e2f61bdab
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Kent Hansen [Wed, 30 May 2012 11:23:28 +0000 (13:23 +0200)]
Avoid copy-and-paste of property cache resolution code
Change-Id: I0f3d8c1641c7c277ef62af7d4f81437e44ac0bad
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Kent Hansen [Wed, 30 May 2012 09:33:32 +0000 (11:33 +0200)]
Avoid string-based lookup of signals
Change-Id: I5b83b5d07b6a5d2de86d0f37471cf59baa7b0e43
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Chris Adams [Thu, 31 May 2012 04:48:18 +0000 (14:48 +1000)]
Fix another crash due to unregistered enum types
f62ab0a3dfaa873bb15cd1526f98f50a17228a9c missed one other case,
when binding valid property values to invalid property types.
This commit fixes that case, and adds both binding and assignment
tests for that case.
Change-Id: Iaca889e4214d2218012d30c4a00f2aac886375f7
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Martin Jones [Thu, 31 May 2012 22:43:19 +0000 (08:43 +1000)]
Firm-up the over bound Flickable behavior
When the end of a list is reached or you flick past the bounds the
amount of tension is too weak and items fly far to far past their bounds
or can be pulled far to far down from the edge
Reduce the default maximum overshoot. Ensure that the amount we have
already flicked past the bound is considered in the overshoot
calculation.
Task-number: QTBUG-25427
Change-Id: Ia102b9995f944beebf6b4efc6ee35c6e9fe56d79
Reviewed-by: Bea Lam <bea.lam@nokia.com>
Damian Jansen [Mon, 30 Apr 2012 00:44:47 +0000 (10:44 +1000)]
Update system tests
A few items have changed, namely:
SpriteImage property names
XmlListModel is separated from QtQuick
A fixed bug in ParticleSystem
Change-Id: Iec8fb1c6ad0a76deb6b0733caf3b893e0da0627e
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Bea Lam [Thu, 31 May 2012 05:10:42 +0000 (15:10 +1000)]
Skip tst_complete test in qquickanimationcontroller
This test sometimes fails.
Task-number: QTBUG-25967
Change-Id: Ic8f87e8ac44761b989f525fb1b90aa5df90abe6f
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Yann Bodson [Fri, 11 May 2012 03:54:08 +0000 (13:54 +1000)]
Replace twitter demo with new tweetsearch demo
Change-Id: I1b4433e63184cb773056bb753011d6320254cd52
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Bea Lam [Mon, 28 May 2012 01:56:24 +0000 (11:56 +1000)]
Fix doc snippets paths and parsing errors
qtqml.qdocconf and qtquick.qdocconf now refer to the correct
snippets and source directories.
Snippet paths in .qdoc and .cpp files have been updated to refer to
the new shortened path references, e.g. \snippet qml/file.cpp instead of
\snippet doc/src/snippets/qml/file.cpp.
This also deletes snippets from src/qml/doc/snippets that belonged under
src/quick/doc/snippets (and were already duplicated there anyway) and
restores some snippet files that shouldn't have been deleted.
Also fixes some inline snippets to use \code .. \endcode instead of
\qml .. \endqml as they contained javascript or partial QML
snippets that were causing parsing errors from qdoc.
There are still snippet errors arising from qmlintro.qdoc as the
qmlintro snippets directory that it refers to cannot be located.
There are also two references to a removed snippet identifier in
examples/qml/cppextensions/plugins/plugin.cpp that need to be fixed
in conjunction with the related docs in a later commit as the relevant
code has changed and the docs are now invalid.
Task-number: QTBUG-25721
Change-Id: I50c665245a74c140470c58a32546591d187dfe4b
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Mitch Curtis [Tue, 29 May 2012 07:40:58 +0000 (09:40 +0200)]
Clean up QJSEngine tests.
Change-Id: Ia778f07a79c3354b639e25dbd847c0ff643b5418
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Martin Jones [Wed, 30 May 2012 02:58:04 +0000 (12:58 +1000)]
Clearing a view didn't reset content size.
Ensure that a valid contentHeight/contentWidth is set regardless
of whether there is a valid model.
Change-Id: I546683c7571a1379e3ca2ef285435ad48319e8e4
Reviewed-by: Bea Lam <bea.lam@nokia.com>
Charles Yin [Thu, 17 May 2012 23:58:09 +0000 (09:58 +1000)]
Enable threaded/immediate rendering for FBO(step 1)
1. Create a new gl context if the scenegraph render thread is different with context2d render thread
2. Expose the gl context and window surface from context2d
3. Get the right current gl context before painting
Change-Id: I5e252a8142d760442f9dfb53ed8a8ce289379af9
Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
Andrew den Exter [Tue, 29 May 2012 05:45:15 +0000 (15:45 +1000)]
Reset the PathView currentIndex to 0 when all items are removed.
The default currentIndex for an empty PathView is 0, and except when
there is no model or an empty model setCurrentIndex won't allow a
currentIndex outside the valid index range for the model. This changes
the wrapping for negative numbers in setCurrentIndex so that it is
consistent with decrementCurrentIndex and forces the currentIndex to
0 if there are no model items.
Task-number: QTBUG-21316
Change-Id: Id4d4d78e9832d05baf8a9d148e7f81ee89c9bc61
Reviewed-by: Martin Jones <martin.jones@nokia.com>
aavit [Wed, 30 May 2012 09:13:55 +0000 (11:13 +0200)]
Avoid non-deterministic ordering of glyph nodes.
The ordering of glyph nodes depended on the internal ordering
of a QHash, where the key contains the value of a heap pointer,
so it could change with each run (even if QT_HASH_SEED was set).
This made effective regression testing impossible.
Change-Id: I1e5cff7db6d0db9ebbfb1e5b2e3d6e56170752b7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Jiang Jiang [Wed, 30 May 2012 07:50:34 +0000 (09:50 +0200)]
Fix lineHeight test for QQuickText
qCeil() should be used to wrap the result of height() instead of
the end result after multiply with 1.5.
Change-Id: Ia69d63ad4a9aa9c48365b8c3b994708bbbdab7c5
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
Mitch Curtis [Fri, 25 May 2012 16:37:24 +0000 (18:37 +0200)]
Clean up QJSValue tests.
Change-Id: I967facfbd0b738c3a2938904a094f6312be5dcef
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Simjees Abraham [Fri, 25 May 2012 07:02:44 +0000 (09:02 +0200)]
Debugger: Clearing the ObjectReferenceHash
ObjectReferenceHash is cleared when the Qml file is reloaded.
Change-Id: I78da1d88cce2f04fe820f3af14b047cd562e90ed
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
Jerome Pasion [Wed, 30 May 2012 08:32:19 +0000 (10:32 +0200)]
Doc: Changed title of "QML Plugins and C++ Bindings" article
New title is "C++ in QML Applications"
Change-Id: Ic5d3bb6488e2d41c2b1b75557c8d043a9e6871d4
Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
Eskil Abrahamsen Blomfeldt [Thu, 24 May 2012 13:51:27 +0000 (15:51 +0200)]
Uses new batching API to potentially speed up glyph cache
Give the cache information that a burst of requests/releases
are coming, so it can potentially optimize this.
Change-Id: Icfb591a63075c2f1e93bf269402649116de9e5be
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Damian Jansen [Tue, 15 May 2012 04:32:07 +0000 (14:32 +1000)]
Clean up visuals of elements test
Elements were not being displayed correctly on small screens,
i.e. devices. Should anchor these to the bottom, rather than center.
Also fix layout element child positions, as opacity is not used to
determine placement - use visible property instead.
Change-Id: I9fff7e64f3f03f1a4d60a242fb8f95629da6f7c9
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Andrew den Exter [Mon, 21 May 2012 03:04:06 +0000 (13:04 +1000)]
Use a shared meta-object for VisualDataModel list context objects.
The objectDestroyed() function on QAbstractDynamicMetaObject makes it
possible to reference count dynamic meta objects so there is no longer
a need to construct an instance per item.
Change-Id: I6f32b803b97db015212284718239dc3062dcefe7
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Chris Adams [Wed, 14 Mar 2012 02:00:40 +0000 (12:00 +1000)]
Ensure that variant property references keep QObjects alive
Previously, only var property references could keep QObjects alive.
This meant that the garbage collector would collect QObject data
prematurely.
This commit ensures that variant properties keep QObjects alive as
required.
Task-number: QTBUG-24767
Change-Id: Ic98a06863251a3e7d6384ba9256810a78fb23406
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Martin Jones [Mon, 28 May 2012 22:46:43 +0000 (08:46 +1000)]
Remove unused data member in QQuickPixmapCache
Change-Id: Ia66d2fac821c133d00d9dfcaf2b497f212ffc832
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
Michael Brasser [Tue, 29 May 2012 01:15:11 +0000 (11:15 +1000)]
Change animation grouping and ownership model.
Don't rely on QObject ownership.
Change-Id: Id1b27a5f8a15ef24c34b206d5736aad344bf9ada
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Matthew Vogt [Mon, 28 May 2012 05:51:42 +0000 (15:51 +1000)]
Do not modify 'declarative' in file paths
Change-Id: I527a115f02671577c754a36f3ab0b7086c5c7918
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Gunnar Sletta [Tue, 29 May 2012 08:13:45 +0000 (10:13 +0200)]
Improve QQuickCanvas::createTextureFromImage() docs a bit
Change-Id: I7be40edeee8bfca2a2725e998f64922388b97f64
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Simjees Abraham [Fri, 25 May 2012 07:18:53 +0000 (09:18 +0200)]
Debugger: Modified response for "destroyObject" message.
The response for "destroyObject" carries the debugId of the
destroyed object.
Change-Id: I9be56f8db42ff2e83544ebbd058a6a8d48b4c98f
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
Gunnar Sletta [Thu, 24 May 2012 14:05:17 +0000 (16:05 +0200)]
Enable QML_FIXED_ANIMATION_STEP by default with buffer queueing.
On Mac OS X and other systems with buffer queueing GL,
we have very jerky animations as the pipeline
does not block at regular intervals, causing the
current-time based animations to come out very jerky
despite us rendering at 60 FPS with a very good margin.
To remedy this, we switch the default so that we by default
advance with a fixed increment, making the uneven frames
not a problem. This then comes at the cost of that animations
will slow down if the application does not manage to render
within 16 ms, but this is an acceptible compromise. Aka,
now it will occationally look bad, as opposed to always bad
which it currently does.
Change-Id: I44a6c3e51f434e4235e49485182380ea531876d9
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Rohan McGovern [Tue, 29 May 2012 06:16:46 +0000 (16:16 +1000)]
Set explicit testcase.timeout for slow tests
We'd like to decrease the default timeout for tests in the Qt Project CI
so that we waste less time waiting for hanging tests.
Tests which genuinely take a long time to run, such as these, should
have their timeout explicitly set in their .pro file.
Change-Id: I24c91494a5cc30af1d8929c995886253ab34fe86
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Kent Hansen [Thu, 22 Mar 2012 21:30:14 +0000 (22:30 +0100)]
Add internal API for accessing V8 handles of QJS types
Make it possible to use the V8 API directly. This might be necessary
in cases where the QJS API is missing some functionality (e.g.,
controlling the V8 profiler), or for performance reasons (e.g.,
avoiding overhead of QJSValue indirection).
The V8 API is clearly more extensive than the QJS API, and QJS will
likely never reach feature parity with it (since that's outside the
scope of QJS). By providing access to the underlying V8 types, users
can still choose to use V8 directly in the (hopefully rare) cases
where the public QJS API isn't sufficient.
Two new functions are introduced:
- qt_QJSEngineV8Context(QJSEngine *) returns a local handle to the
engine's internal V8 context.
- qt_QJSValueV8Value(const QJSValue &) returns a local handle to the
QJSValue's internal V8 value.
The caller is responsible for
- ensuring that a V8 handle scope is in place;
- entering/exiting the QJSEngine's V8 context.
The documentation and tests show how that can be done.
Also added a benchmark for QJSValue that can be used to measure the
effect of using raw V8 API for some common operations.
Change-Id: I680aeb2f67ffe5eeadd432a05c8084e43921a118
Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Andrew den Exter [Mon, 28 May 2012 23:50:13 +0000 (09:50 +1000)]
Fix nested GridView key navigation with a single row or column.
Don't ignore key events when the currentIndex is unchanged due to
wrapping.
.
Task-number: QTBUG-21999
Change-Id: Idc82d472ca7ec495669207761bfe7de58b8781f9
Reviewed-by: Bea Lam <bea.lam@nokia.com>
Andrew den Exter [Mon, 28 May 2012 06:38:35 +0000 (16:38 +1000)]
Fix scaling of svgz images.
Force scaling of svgz images to source size as is done for svg. This
also removes a work around for QTBUG-9053 which has now been resolved.
Task-number: QTBUG-9053
Change-Id: I3aa898f74960ceb2e515bdb3aa44aa5a1a7a64d2
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
Andrew den Exter [Fri, 25 May 2012 06:02:41 +0000 (16:02 +1000)]
Update the cursor rectangle when password echo timer expires.
Ensures the cursor is positioned correctly is if the echo mask glyph
has a different width to the character it replaced.
Change-Id: I924234d4ae29cbb2e61638918005fcc3dc230993
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
Alan Alpert [Tue, 29 May 2012 04:57:16 +0000 (14:57 +1000)]
Add a test for using files stored as resources.
Change-Id: Ia7abd18e3d71025cf8b9eb3ed466b52191e57a0c
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Charles Yin [Mon, 28 May 2012 06:09:26 +0000 (16:09 +1000)]
Don't use deleted QQuickPathAnimationAnimator
1) If QQuickPathAnimationAnimator was deleted, just return 0 for transition
2) Add Null checking for all animation::transition() calls
Change-Id: I1248d08fe05da5c9ff58f7b812ff11545959032f
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Charles Yin [Mon, 28 May 2012 23:50:08 +0000 (09:50 +1000)]
Fix memory leaks in QQuickParentAnimation
Change-Id: I7b386b3b5f974e068c7ca00d3d9ea92a62fc70d9
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Charles Yin [Tue, 29 May 2012 00:23:32 +0000 (10:23 +1000)]
Add missing uninitialized members
Change-Id: I5e72de0f997dddcd0a3ca041736414401d1379a4
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Charles Yin [Tue, 29 May 2012 00:26:14 +0000 (10:26 +1000)]
Add missing unintialized member in QQuickParentAnimationData class
Change-Id: I0dc3a04f594a6a894281f593964a87924ec29336
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Charles Yin [Tue, 29 May 2012 00:30:45 +0000 (10:30 +1000)]
Add missing unintialized member in QQuickPathAnimationUpdater
Change-Id: Ia242a405949d9ca85089101c5368acd564932a05
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Charles Yin [Tue, 29 May 2012 00:32:56 +0000 (10:32 +1000)]
Add missing unintialized member in QV8Context2DResource
Change-Id: Id00122fc018cc57f9985163bcdda5d1e036e46d5
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Charles Yin [Tue, 29 May 2012 00:38:41 +0000 (10:38 +1000)]
Remove unreachable code from qquickcontext2d.cpp
Change-Id: Ia084c34ec8f897bdc4a4e4f89f74e6c3dca6c026
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Charles Yin [Tue, 29 May 2012 00:51:21 +0000 (10:51 +1000)]
Avoid using previously declared variables
Change-Id: Ia4ba88bef012cee7329244adf10c219bd763a936
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Charles Yin [Tue, 29 May 2012 00:53:16 +0000 (10:53 +1000)]
Avoid using previously declared variables
Change-Id: Ie2f003cacc99fda00b666ed194cb044a7ee3faf1
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Charles Yin [Tue, 29 May 2012 00:58:44 +0000 (10:58 +1000)]
Add Q_DISABLE_COPY to QQuickContext2D
Change-Id: I367bb3b630b916775c1c35656fd74838dbbb00bd
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Matthew Vogt [Tue, 29 May 2012 01:01:59 +0000 (11:01 +1000)]
Remove obsolete overload of QQmlEngine::importPlugin()
Task-number: QTBUG-25122
Change-Id: I63fb462192e6d8292c00755a7d37e72e9110293a
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Martin Jones [Mon, 28 May 2012 05:32:11 +0000 (15:32 +1000)]
Fix potential buffer overrun.
Found by static analysis. operator[]() accepts index up to
QVariant::UserType-1 but only QVariant::UserType-1 were allocated.
Change-Id: I0691fe268e3ba029441e43bdfcd191400ea21f38
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
Martin Jones [Mon, 28 May 2012 23:08:42 +0000 (09:08 +1000)]
Initialize data members in quick.
Found by static analysis.
Change-Id: Ide1ce1d7964655664dc872de6da9962a281e229c
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Charles Yin [Mon, 28 May 2012 23:33:09 +0000 (09:33 +1000)]
Fix potential memory leaks in context2d
Change-Id: I51e75ed17fd3f12e9ba1bb7777b9f611b06b5d1d
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Martin Jones [Mon, 28 May 2012 23:04:05 +0000 (09:04 +1000)]
Initialize data members in QML engine
Found by static analysis. None look suspicious, but worthwhile cleaning
up.
Change-Id: Icb5046eb9e57493a9c68b3509ca0c7f546480b73
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Yann Bodson [Mon, 28 May 2012 23:48:25 +0000 (09:48 +1000)]
Remove unnecessary temporary variable
Change-Id: Icec38fb08d6dc31fb6d0d86ec280fbb4557d5b67
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Friedemann Kleint [Fri, 25 May 2012 10:01:31 +0000 (12:01 +0200)]
Fix warnings about truncation from size_t to int (MSVC2010/64bit).
Change-Id: I5e12f241484b497ae2bd79ea1cbde4913908bd20
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Rohan McGovern [Mon, 28 May 2012 04:33:28 +0000 (14:33 +1000)]
Add CONFIG+=parallel_test to suspected parallel-safe tests.
These tests have passed a parallel stress test on all three of Linux,
Mac, Windows. Mark them with CONFIG+=parallel_test to allow CI to run
them in parallel, saving time.
Change-Id: I16407d68c583e6e9b8ef9c536cfee156d56bd2e2
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Andrew den Exter [Mon, 28 May 2012 04:06:13 +0000 (14:06 +1000)]
Fix flicker when changing ListView currentIndex with VisualItemModel.
Return the Referenced flag when the view has outstanding references
otherwise it will attempt to hide an item if believes shouldn't be
visible.
Task-number: QTBUG-25849
Change-Id: I7387ab8322a1cd7f3386685086b2b8ad10c8b4f0
Reviewed-by: Bea Lam <bea.lam@nokia.com>
Andrew den Exter [Fri, 25 May 2012 01:41:17 +0000 (11:41 +1000)]
Fix PathView not updating after all items are removed from the model.
Always clear the layoutScheduled flag on a refill even if there are no
items to create, otherwise future layouts won't be scheduled because
it appears one is already pending.
Fixes an issue in the dragselection example where items that should
have moved to the PathView instead disappeared.
Change-Id: I4302b5b43184c697a78f5c09dc3811326e2271ca
Reviewed-by: Martin Jones <martin.jones@nokia.com>
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>