Andrew den Exter [Tue, 5 Jun 2012 06:33:52 +0000 (16:33 +1000)]
Don't cache item indexes in VisualDataModel.
Sacrifice constant time lookup of indexes for rarely used features for
reduced memory usage.
Applications which use neither Packages, nor the VisualDataGroup api
don't ever need to query the index of an item so caching and maintaining
those indexes in unnecessary. Where they are used this add a cost
scanning for the index of an item in the cache, and in some instances
a lookup cost in the compositor.
Change-Id: I7d3c21a27a8a3c068c5ae2e1e326ff573c44d712
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Andrew den Exter [Tue, 5 Jun 2012 04:16:50 +0000 (14:16 +1000)]
Destroy incubated objects if they are not claimed when ready.
If model data is removed while an object is incubating for it the view
cannot cancel the incubation because the index is invalidated. So if
the object has not been referenced after signalling it is ready assume
it's been abandoned and destroy it.
Change-Id: I32708e940cfbccbe0d330ad7822f29d3c1f39d13
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Bea Lam [Wed, 6 Jun 2012 01:17:19 +0000 (11:17 +1000)]
rebound property for Flickable
This property specifies the transition to be used when the
flickable snaps back to its bounds.
Change-Id: I2bb9680dad219a4c7c911f0e4dda37ae739349c6
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Oswald Buddenhagen [Fri, 25 May 2012 09:30:40 +0000 (11:30 +0200)]
put private Qt dependencies below load(qt_module_config)
this will soon be needed to omit them from the master include header.
Change-Id: I8f62a228a68fd53605eaf3f39f412a7b30c529b3
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Aaron Kennedy [Wed, 6 Jun 2012 13:12:01 +0000 (14:12 +0100)]
Don't double emit threaded signals
As the metacall event was posted to the object emitting the signal, it
caused the signal to be *reemitted* on the object thread. If both QML
and Qt connections were present, the Qt ones were run twice.
Change-Id: I4bc1402ab0a43762ff6fef173ecc77fc20508bad
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Glenn Watson [Thu, 7 Jun 2012 00:06:14 +0000 (10:06 +1000)]
Fix alpha being ignored in Text element
The text element was using the implicit constructor to convert
QRgb -> QColor which ignores alpha. Use the explicit conversion.
Change-Id: I7975ffeab8b423716b9655776f38b0ca2f282cd0
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
Luís Gabriel Lima [Sat, 2 Jun 2012 16:29:45 +0000 (13:29 -0300)]
Fixing MouseArea::onWheel event doc
Change-Id: Ice5698ead44a6ca04f55739714818dd5d1da123a
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Aaron Kennedy [Thu, 24 May 2012 15:28:54 +0000 (16:28 +0100)]
Disallow parent changes for QML created objects
Currently this is protected with a QML_PARENT_TEST environment variable
to allow the rest of QtQuick to be updated before it is enforced.
Change-Id: I4dd3644cbbce91d67f24c9556637f97eafb00638
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Shane Kearns [Fri, 1 Jun 2012 13:36:48 +0000 (14:36 +0100)]
QQmlXmlHttpRequest - use readyread signal not downloadProgress
The readyRead signal (part of QIODevice base class) is the
appropriate signal for knowing when there is data available
in a QNetworkReply.
DownloadProgress is intended for UI elements e.g. progress bars.
Previously it was emitted at the same time, but now it is emitted
less often.
Task-number: QTBUG-20449
Change-Id: I60abb8f807bde314785c301dac74d27238be1a23
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Bea Lam [Mon, 4 Jun 2012 03:34:57 +0000 (13:34 +1000)]
Don't emit moving and flicking signals unnecessarily
The moving and flicking signals should only be emitted once when
the view has been moved/flicked both vertically and horizontally. (This
was already done correctly for the dragging signals.)
Also changes QQuickFlickable::flick() to return bool instead of void.
Subclasses no longer emit the flicking signals but call
flickingStarted() instead.
Also splits the tst_qquickflickable::movingAndDragging() test up into
several tests.
Change-Id: Ie527568a9702049dd0bcda18c2eb3e43d8938a18
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Samuel Rødal [Wed, 6 Jun 2012 06:33:24 +0000 (08:33 +0200)]
Fixed compile error in qqmlscript.cpp due to narrowing conversion.
qqmlscript.cpp:917: error: narrowing conversion of ‘6u’ from ‘size_t’
to ‘int’ inside { }
Change-Id: I2dae5b0fb8644b48bfa38bbb7bd173537a03a1a4
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
Martin Jones [Fri, 18 May 2012 08:40:15 +0000 (18:40 +1000)]
Fix filesystem case sensitivity of QML directory cache
Don't attempt to compare file case - if we miss the cache
do a stat to determine file existance.
Change-Id: Ida79e81c75bc8f4064ba823d11fd0a097bac8b6b
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
Laszlo Agocs [Mon, 4 Jun 2012 13:06:40 +0000 (16:06 +0300)]
Utilize StartDragVelocity style hint in Flickable
Change-Id: I96924b08aede57a0622ea3f7419e8f73a9f18f5d
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Andrew den Exter [Thu, 10 May 2012 04:01:15 +0000 (14:01 +1000)]
Restart a drag when the item canvas changes.
Likewise when a property that affects whether a drag event is likely to
be accepted. Properties were locked in when a drag was started, but
this means that if a drag was started by setting the active property
in a state change or similar bulk change the properties that are
locked in is undefined. And if an item changed canvases during a drag
or the active property was set before a parent enter and leave events
weren't sent as they should have been.
Change-Id: Iefd22dcab4c5469904d8d8c5eaf91ec339540d9c
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Alan Alpert [Thu, 31 May 2012 06:45:45 +0000 (16:45 +1000)]
Fix affected signal and docs
Signal wasn't being called in its primary usecase, which was to interact
without altering the particles. Docs have been updated to clarify the
usecase as well.
This also updates the position properties of custom affector to more
accurately specify if they caused changes.
Change-Id: Ia411d9e81002443a56ed8bab9232f1aad49a4c5e
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Alan Alpert [Wed, 6 Jun 2012 02:04:39 +0000 (12:04 +1000)]
Better documentation for subclassing QQuickItem
Task-number: QTBUG-26025
Change-Id: Ia0fadf54ee8924f9892bc567c107efc4dca80628
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Jerome Pasion [Mon, 28 May 2012 17:40:02 +0000 (19:40 +0200)]
Doc: Grouped Qt Quick types into several groups
-created new groups and converted some overviews into group pages
-edited type documentation and added \ingroup
-articles still need title fixes and link fixes
Groups:
qtquick-visual-types
qtquick-item-graphics
qtquick-shaders
qtquick-canvas
qtquick-text
qtquick-text-validator
qtquick-interaction
qtquick-positioners
qtquick-transformations
qtquick-states
qtquick-animation-define
qtquick-animation-properties
qtquick-animation-control
qtquick-animation-modifiers
qtquick-images-sprites
qtquick-images
qtquick-models
qtquick-containers
qtquick-views
qtquick-paths
qtquick-utility
Task: QTBUG-25685
Change-Id: I81d4df3320bf5daad5cabb5e42408013fb24f464
Reviewed-by: Bea Lam <bea.lam@nokia.com>
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Michael Brasser [Wed, 22 Feb 2012 00:45:53 +0000 (10:45 +1000)]
Remove unused performance flags.
Change-Id: I9a9111703e2480af02b1af7033ea6bb12e7a75a5
Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Yann Bodson [Mon, 4 Jun 2012 07:21:30 +0000 (17:21 +1000)]
Make sure we relayout on height change when onLineLaidOut is used
Change-Id: I66e47682eba337562543a99eb576a7e24d00cdcf
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
Kent Hansen [Sun, 3 Jun 2012 19:16:23 +0000 (21:16 +0200)]
Avoid unnecessary QByteArray creation
Change-Id: I5e76a6f74c39bbffdf31aef2367efeecf1dcf19c
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Simjees Abraham [Fri, 1 Jun 2012 09:49:21 +0000 (11:49 +0200)]
Changes for "App on Top"
Changes made such that the App is on Top at startup if the option was
set in creator.
Task-number: QTCREATORBUG-6295
Change-Id: I218a619805d9091049ba51ac6da2f64049d5185d
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
Anselmo L. S. Melo [Fri, 25 May 2012 02:14:03 +0000 (23:14 -0300)]
Accessible plugin build: Do not install before make install
When prefix is set, libqtaccessiblequick.so was created in the install
directory. This patch fixes this behavior.
Change-Id: I3fe47841676e4ef8912498b6a1d8a42a55a4d6ac
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Charles Yin [Mon, 4 Jun 2012 06:34:17 +0000 (16:34 +1000)]
Introduce QQuickCanvasPixmap
1. QQuickPixmap now only store textures instead of QImage data, however
context2d still need to access the QImage in some places, so cache the
loaded images to avoid the expensive GL readback operations.
2. Use texture directly if the render target is FBO.
Change-Id: I6228011e5698fa00f2e3420a3a4a305995b8a238
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Laszlo Agocs [Tue, 29 May 2012 11:30:32 +0000 (14:30 +0300)]
Do not lose timestamps in mouse press events
Change-Id: Iaa7953cd2ea21f43a98f984b6aea43feb0c2fbed
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Rohan McGovern [Tue, 5 Jun 2012 02:21:02 +0000 (12:21 +1000)]
tst_qquickgridview: further increase test timeout
This test has timed out on several recent test runs, but appeared to be
making progress. Increase the timeout to 1100 seconds, approximately
twice the test's runtime from the last successful run.
Change-Id: I42ca4ae860fa22348a9f23343e2f5fef65dc4a86
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Matthew Vogt [Mon, 4 Jun 2012 05:32:32 +0000 (15:32 +1000)]
Allow the global JS UTC offset to be invalidated
If the system timezone is changed, it is necessary to inform
V8 so that the global offset-from-UTC value can be recalculated.
This changes adds the 'timeZoneUpdated' function to the JS
'Date' class exported by QML, which allows QML applications to
inform V8 when the timezone has been updated.
Change-Id: Ic5898ca7bc640002a4a6fd5a52b8623d87ee8085
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Martin Jones [Fri, 1 Jun 2012 04:53:26 +0000 (14:53 +1000)]
Allow qtdeclarative to compile with -no-widgets
We have no hard requirement for QtWidgets library, so we should
build without it.
Change-Id: I85c85cc1a52bf9daa7ab7916f19bf7cc3ad5845f
Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
Michael Brasser [Wed, 30 May 2012 00:24:14 +0000 (10:24 +1000)]
Delay conversion of v8 exceptions to QQmlErrors.
This conversion in relatively expensive, and not required for transient
exceptions that occur during startup due to the order of binding
evaluation.
Change-Id: I29a16c075890c8966c0bad0a77412ad232c791bb
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
Alan Alpert [Tue, 29 May 2012 10:44:14 +0000 (20:44 +1000)]
Use the texture coordinates provided by QSGTexture
Change-Id: I24e377ba69b2108f3bc4f6aca3ed910fbbf77caf
Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Andrew den Exter [Fri, 1 Jun 2012 01:47:12 +0000 (11:47 +1000)]
Hide the default cursor if a cursor item is available.
Change-Id: I9ef3350a60ddd355ab588c9cfb3256004ee4493e
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
Andrew den Exter [Fri, 25 May 2012 06:41:14 +0000 (16:41 +1000)]
Ensure the cursor delegate position is updated on text changes.
Change-Id: I7518aa5969ea45538feccb87f4c296db6b7d6944
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
Charles Yin [Mon, 4 Jun 2012 13:03:58 +0000 (23:03 +1000)]
Fix unstable test_paint test case
Change-Id: I11c79b3f014d82b113429bd17b2d5473fdcebf1d
Task-number: QTBUG-25859
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Charles Yin [Mon, 28 May 2012 00:48:37 +0000 (10:48 +1000)]
Fix canvas item drawImage bug with FBO render target
If canvas' render target is FramebufferObject, only the first drawImage() call
was successful, it could be fixed by adding beginNativePainting() and endNativePainting(),
but this could be unexpected behavior with OpenGL paint engine.
task-number: QTBUG-23595
Change-Id: Iff70fc88f6d39655dd283fa5dde3365887910460
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Michael Brasser [Mon, 4 Jun 2012 00:36:52 +0000 (10:36 +1000)]
Send valueTypeIndex to setBindingNoEnable in the expected format.
Ensure we send a -1 if the property is not a value type property.
Change-Id: Ic4fa6954a0bcfd32d50da565f82f21f17d81ac9b
Reviewed-by: Martin Jones <martin.jones@nokia.com>
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>