aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick
Commit message (Collapse)AuthorAgeFilesLines
* Handle QEvent::TouchCancel in QML_TRANSLATE_TOUCH_TO_MOUSE modeMartin Jones2012-03-091-0/+8
| | | | | | | | Just remove the mouse grab. The elements will react to this and correct their state. Change-Id: I8b91295606eaface54aa95b1500e7b138d9bc82e Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Fix selected text highlight in TextEdit.Andrew den Exter2012-03-081-1/+1
| | | | | | | | | The call to QQuickTextNode::addTextDocument() omitted the anchor color argument meaning every subsquent argument was off by one and the selection end was always the default of -1. Change-Id: Iac3165e7aa95a3db935a19e54144d3967a3e6e38 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Improve accessibility action support for Qt QuickMorten Johan Sorvig2012-03-071-13/+9
| | | | | | | | | | | Add interface_cast for the action interface. Implement actions for the following roles: Button : Press CheckBox, RadioButton : Press, Check, Uncheck Slider, Spinbox, Dial, ScrollBar : Increment, Decrement Change-Id: Ic8e0d17c709ba51655f3f4b699092baf603b6f18 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* QQuickView with the default constructor doesn't show any window decorations.Alexis Menard2012-03-071-2/+2
| | | | | | | | | | | | | The default parameter takes a 0 which is propagated to the window platform which sets it to 0. QWidget have a method called adjustFlags which takes care of adding QWindow when necessary. There is no such check in QWindow or the platform plugin for QPA. The default flag of QWindow is Qt::Window but in that case it is overiden as QQuickView constructor calls setWindowFlags(0). Qt::Window as a default parameter is a solution. Change-Id: Iccbebc5b7e4f094c7fc6dc61b37d9f9622be0237 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* ListView can freeze if flicked beyond its bounds.Martin Jones2012-03-072-14/+17
| | | | | | | | | | | | | | If the delegate's size changes in componentComplete and all items are flicked out of view, an incorrect jump calculation in addVisibleItems() resulted in a new delegate being created in the wrong position, and retriggering the jump calculation, which resulted in a new delegate being created in the wrong position, and retriggering the jump... Also fixed currentItem visibility. Change-Id: Iad5f211c4fc5eed9c009d51a0ce3b58181a7b36e Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Fix setting of target lists when target Transition is not setBea Lam2012-03-074-106/+94
| | | | | | | | | | | Target items are now set from QQuickViewItem::prepareTransition() instead of QQuickItemView and QQuickPositioner to ensure they are for a displaced transition even if there is no matching target transition. Task-number: QTBUG-24535 Change-Id: I0a6c7e3c6198786527014d421b96fc562c6186dc Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Change the default renderTarget and renderStrategyCharles Yin2012-03-071-4/+4
| | | | | | | | | | As we always use OpenGL and scenegraph render thread now, the best default render target should be FBO and the best render strategy should be cooperative mode (use the render thread). Task-number:QTBUG-23956 Change-Id: I64b070dec566e359d27c84680fef1c691d6ce411 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Repaint the canvas item properly when canvas resizedCharles Yin2012-03-072-13/+13
| | | | | | Task-number:QTBUG-23594 Change-Id: I703a5190b5b306666ffd61001ff94f296399465f Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* prepareTransition() must cancel current transitionBea Lam2012-03-071-7/+6
| | | | | | | | | | | | | | | | If it does not, itemX() or itemY() will still return the current transition's 'to' position instead of the nextTransitionTo pos that was scheduled for the next transition (which the item now has moved to using the direct setPos() method). Also refactor prepareTransition() to always move the item directly to the nextTransitionTo if transition is not going ahead. Also fix some broken test code. Task-number: QTBUG-24523 Change-Id: I2e536fbc0da2acbf96fdf2d177190a8968f7fdb1 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix texture leaks in QQuickCanvasItemCharles Yin2012-03-071-2/+9
| | | | | | | | | | In commit be4c74948371ddf6f1ed260783b43b5a3d9e60a7 we removed the QQuickCanvasItemNode, but textures are not automatically deleted with QSGSimpleTextureNode, so add a very thin sub class of QSGSimpleTextureNode to just cleanup canvas texture to avoid texture leaks. Change-Id: I31aac1068e8218a75129b52afbbf30fb66e4bbf7 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Fix missing glyphs when using shared distance-field cacheEskil Abrahamsen Blomfeldt2012-03-063-14/+24
| | | | | | | | | | | | | | | | | | | | | | When using a shared distance field cache, signals such as itemsMissing() and itemsUpdated() can be triggered in the server process by external requests. This, in turn, can lead to unnecessary storeGlyphs() calls (performance hit) and, even worse, calls to setGlyphPositions() for glyphs which have not previously been requested through populate(). The latter could cause missing glyphs when the same characters were requested later, as they would then be stored in the cache with the bounding rect of a default constructed QPainterPath (in setGlyphPositions()). To fix this, we ignore all glyphs which have no been requested in this process, thus filtering out all events for glyphs which have only been used externally so far. I've also added an assert to the setGlyphPositions() to help us catch this case early if it should return. Change-Id: Ief333f612e4affea768d9c60409d43ce29fe3f60 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Cleanup QQuickCanvas and QQuickView docs.Martin Jones2012-03-062-1/+19
| | | | | | | Mark reimplemented protected methods. Change-Id: I544d68e16d82a37f5612fd72cd185a23c70157a7 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Continue refactor of Canvas rendering.Justin McPherson2012-03-066-49/+49
| | | | | | | | - Remove sync() - not necessary - Queue buffer before flush Change-Id: If7dea8e56a612d241c67a82eae265febc45059a8 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Use NPOT support if available.Justin McPherson2012-03-062-52/+43
| | | | | | | In QQuickContext2DTexture. Change-Id: If0311450658a837b7e2665c041ec2846e3c8c2dd Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Remove QQuickCanvasItemNode.Justin McPherson2012-03-064-206/+4
| | | | | | | A custom SGNode is not necessary. Change-Id: Ibde71dd502bc782503dbd7d98e6ad8b811b7aedb Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Fixed QQuickCanvas header with QT_NO_KEYWORDSRohan McGovern2012-03-061-1/+1
| | | | | | | slots -> Q_SLOTS Change-Id: I971a0077a2606e197e9542ccb864e57d0b0e9f4f Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Handle MouseArea.enabled = false after mouse is pressed.Martin Jones2012-03-051-6/+6
| | | | | | | | | | | | | Currently this leaves the MouseArea in a broken state, i.e. still in pressed state, and the next press after it is re-enabled is ignored. In this case we now allow subsequent mouse move or release events to continue. Following the release, no further press will be accepted. Change-Id: I65a890da90e2166ad568505fffdbd3db6c97165b Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Do not store an explicit QImage in the declarative pixmap cache.Gunnar Sletta2012-03-052-73/+47
| | | | | | | | This opens up for the scene graph adaptation only storing textures which effectively halves the memory usage for textures and images. Change-Id: I3452a15844ceeb4fc3a465865f99ee16e3e05607 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Made QQuickWindowManager pluggable via QSGContext.Gunnar Sletta2012-03-056-29/+45
| | | | | | | | | | Also rename paint() to exposureChanged() as that is what the function actually means. The implementation of paint() has been removed in both trivial and threaded version as it is superflous as show() already triggers rendering. Change-Id: I7e53f42786efaf961921f10a39977de511965d71 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Fix crash with AnimatedImage caused by race condition.Gunnar Sletta2012-03-051-4/+23
| | | | | | | | | | | | In QDeclarativePixmap::setImage() we deleted a QDeclPixmapData and recreated a new one in a very short timespan and the new texture factory was the same pointer as the deleted one, yet a queued destroyed signal was still emitted. Depending on when the queued connection was handled in the rendering thread, this would cause problems with the value returned from textureForFactory. Change-Id: Ibd785ca12667c99efb88b92689ae7ac4fa87c7ee Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Use premultiplied format because it's fasterAlan Alpert2012-03-051-1/+1
| | | | | Change-Id: I4d78830d2cf03f2deba70c29c2fc221eeec9d63c Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Merge master <-> api_changesMatthew Vogt2012-03-05126-2623/+4104
|\ | | | | | | Change-Id: Iad2f07b989b25349fd2d4fff010e24dcd5a1688f
| * Fix when animating items that are already movingBea Lam2012-03-022-5/+16
| | | | | | | | | | | | | | | | | | | | The view must transition displaced/moved items that are currently transitioning to another position; check against the current transition-to position, not just the current item position. Task-number: QTBUG-24522 Change-Id: Icf1c290f76ceb8c93716f1562ae0bc5a75445b78 Reviewed-by: Martin Jones <martin.jones@nokia.com>
| * Use velocity from touch events only when they are validLaszlo Agocs2012-03-023-8/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the capability flags to the extended mouse events. Otherwise it is not possible to tell if the velocity is valid. While the original version is fine if velocity is guaranteed to be available whenever QT_TRANSLATE_TOUCH_TO_MOUSE is set, some platform and driver combinations, e.g. the evdevtouch plugin that comes with Qt, do not provide velocity data in touch events. The touch-only mode of QML may be very useful in these cases too, we just need to fall back to the built-in velocity calculation. Change-Id: Iec5e7632a66380dc04c9435b09f5c173107bbe00 Reviewed-by: Martin Jones <martin.jones@nokia.com>
| * Treat parentless items as focus scopesAlan Alpert2012-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | The root item of a tree is implicitly a focus scope simply because it is the root of the tree. QQuickRootItem could gain the focus scope flag in order to solve this for most cases, but there would still be a possiblity of a crash for disconnected trees. Change-Id: I6e04f11df4268fb3b96660d50707d70935a5dc5e Reviewed-by: Martin Jones <martin.jones@nokia.com>
| * Improved transitions for Row, Column, Grid, FlowBea Lam2012-03-024-181/+250
| | | | | | | | | | | | | | | | | | | | | | | | | | The view transitions functionality for ListView and GridView has been integrated into the positioner elements. Not all of this functionality is available for positioners, though, since they don't have models (and thus cannot identify certain model operations) and they don't manage the lifetime of their children. Task-number: QTBUG-24336 Change-Id: I71588de289555d2ef5a763af11358bc0af7b31a7 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
| * Fix if transitioner is deleted before transition job finishesBea Lam2012-03-022-62/+111
| | | | | | | | | | | | | | | | | | Don't let TransitionJob call finishedTransition() on a deleted transitioner. Also don't use target transitions that are not enabled. Change-Id: I94d58e8c7b072f7f3d76533956cac2d63ac33ff6 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
| * Set bind options before uploading to give hints to the driverGunnar Sletta2012-03-011-1/+2
| | | | | | | | | | | | | | | | This can prevent allocation of unused mipmap levels on some drivers. Change-Id: I2d730c04e120872367078b17a344c01b4d4aa87a Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
| * Avoid unnecessary updates when using in-process cacheEskil Abrahamsen Blomfeldt2012-03-012-5/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whenever an in-process cache is updated, it will emit itemsAvailable() signals to all listening glyph caches. This will in turn cause each of the glyph caches to update and each of the glyph nodes to be preprocessed (the entire scene graph will be updated.) This happens even if the changes to the in-process cache are requested by an external client, due to a cross-process cache sharing mechanism. However, itemsAvailable() signals are only interesting if the items were requested by the in-process cache. We therefore add a mechanism now to check if the glyphs were actually requested by the cache before updating anything. Change-Id: I529f94b3928c2a5e06fec354014fa11d21671057 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
| * No double click event in QML_TRANSLATE_TOUCH_TO_MOUSE modeMartin Jones2012-03-011-5/+13
| | | | | | | | | | | | | | | | Since double clicks are delivered before the click, the initial grab may not have been established. Change-Id: Id9282489f0551d421da800294e88ead0915482cc Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
| * Fix material compare for distance field glyph nodes.Glenn Watson2012-03-011-1/+5
| | | | | | | | | | | | | | | | | | The compare function did not take into account the GL texture ID when comparing materials. This could result in a renderer merging glyph nodes into a single batch incorrectly. Change-Id: Ib62c43f93fb1bbbc231197323dced4254ffa12aa Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
| * Allow styled text to be elided.Andrew den Exter2012-03-012-9/+65
| | | | | | | | | | | | Task-number: QTBUG-24521 Change-Id: Idd451d0a8a238a60691386726e34054c0368b658 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
| * Update item position in parent change atomically.Andrew den Exter2012-03-011-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Changing x and y individually generates two geometry changed events, the first of which has an invalid position as the x coordinate is relative to the new parent and the y relative to the old parent. This in turn causes the Drag item to send move events with incorrect positions. Task-number: QTBUG-24534 Change-Id: If2636a968acc0fffce21d1a7e51510426ace38a0 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
| * Check item before notifying transition has finishedBea Lam2012-03-011-4/+5
| | | | | | | | | | | | | | Fixes crash when using SmoothedAnimation with view transitions Change-Id: Ib9a201e417c34d64f8144a616e75cae8b67568e2 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
| * Fix crash when transition finishes after view is deletedBea Lam2012-03-011-0/+2
| | | | | | | | | | Change-Id: I5bb525bab735536fa7ae3a7f60bf775cd93cf3c1 Reviewed-by: Martin Jones <martin.jones@nokia.com>
| * Reduce size of QQuickTextPrivateYann Bodson2012-03-012-100/+130
| | | | | | | | | | | | | | Move less used members to an extra struct lazily allocated Change-Id: I87e464af4b9d29303705dd7e766f734309ed7763 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
| * Fix particle system on windowsAlan Alpert2012-02-291-0/+4
| | | | | | | | | | | | | | | | To preserve correctness, just use a non-point-sprite performance level on windows until QTBUG-24540 is resolved. Change-Id: I7608fbe21233534fb22c9d352aafae759e68c143 Reviewed-by: Martin Jones <martin.jones@nokia.com>
| * Make sure positioners remove change listeners for invisible items.Martin Jones2012-02-291-0/+5
| | | | | | | | | | | | | | | | Children that are invisble weren't having their change listeners removed, which showed illegal accesses on destruction in valgrind. Change-Id: Icae798e773168323781e9ab88b3dae6a5aea0952 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
| * Don't round Text dimensions.Andrew den Exter2012-02-292-21/+22
| | | | | | | | | | | | | | | | | | Painting issues in QtQuick1 meant drawing had to be aligned to pixel boundaries, since this is no longer a problem we should use qreal everywhere. Change-Id: I58e88e10270fa603170f1cedf471bfb53bd89b73 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
| * Avoid unneccessary duplication of string data.Andrew den Exter2012-02-291-3/+11
| | | | | | | | | | | | | | | | | | Check for the existence of new line characters before trying to replace them. There's some redundancy if the characters are found but for single line strings we avoid the detach in replace. Change-Id: I48ccc614601a6f356b3d2e68f617e112c100bbdd Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
| * Add generic "displaced" transition propertyBea Lam2012-02-296-52/+176
| | | | | | | | | | | | | | | | This is the default displaced transition that will be applied if addDisplaced, removeDisplaced or moveDisplaced are not specified (or are disabled). Change-Id: I9356036dc93bd9cb26e64e0b1769228113b74273 Reviewed-by: Martin Jones <martin.jones@nokia.com>
| * Properly cleanup cancelled incubation.Martin Jones2012-02-281-2/+22
| | | | | | | | | | | | | | Not all allocations were being destroyed. Change-Id: I2134bb224c58b947cfb990b0af2f6eedfd36da4a Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
| * Separate view transition functionality into new fileBea Lam2012-02-289-921/+1159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move most of the view transition functionality from qquickitemview* into qquickitemviewtransition*. - Move QQuickViewTransitionAttached - Move QQuickItemViewTransitionManager, rename to QQuickItemViewTransitionJob - Move FxViewItem transition-specific features into new QQuickViewItem - Move transition-specific functions like transitionNextReposition() and canTransition() into QQuickItemViewTransitioner which holds all the transition objects now Also mention in docs that there's no defined order for choosing between multiple matching displaced transitions. Change-Id: I8701c0d40d2af152c5d432a4c8de646854c76ea2 Reviewed-by: Martin Jones <martin.jones@nokia.com>
| * Rename SpriteImage to SpriteSequenceAlan Alpert2012-02-286-51/+65
| | | | | | | | | | | | | | Also rename Sprite::frames->Sprite::frameCount Change-Id: I2e7a71adc37044fd696ffda2a5da4835725ba3a8 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
| * Add AnimatedSpriteAlan Alpert2012-02-285-0/+991
| | | | | | | | | | | | | | | | A simpler sprite image element for the simple usecase. Because sometimes an engine with stochastic capabilities is overkill. Change-Id: I2b76c5d417719e92a548f6266bffd563dc016983 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
| * Move distance field util functions to QtGuiJiang Jiang2012-02-287-2481/+2
| | | | | | | | | | | | | | These distance field generation functions have been moved to QtGui. Change-Id: I78d9015c8776717ede2d1299c2ef3787d165e0b9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
| * Fix crash in QDeclarativePixmapStore global static dtorChris Adams2012-02-281-4/+6
| | | | | | | | | | | | | | | | | | | | Due to the undefined ordering of global static dtors, the QDPS dtor could run after the texture factories were deleted. Thus, the QDPS dtor cannot call the cost() method of the pixmap data during its destructor, as this could cause a crash. Change-Id: I5d23066dc57e1992cf9d1c13d514f06c431bc752 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
| * Incubators are not async with the threaded renderer.Martin Jones2012-02-287-11/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | The threaded incubator relies on the event loop spinning to signal item updates. This change ensures that the event loop is processed while items are being created and that the render loop is woken if it is sleeping. Also cancel delegate incubation correctly during destruction. Change-Id: Ib5bb55c788411490e0959c75933da587fdfd4b8c Reviewed-by: Yunqiao Yin <charles.yin@nokia.com> Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
| * Correctly set duration and easing for AnchorAnimation.Michael Brasser2012-02-281-0/+2
| | | | | | | | | | | | Task-number: QTBUG-24532 Change-Id: I3aad9cd8281b954896c2c1d44b2dcae68f913928 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
| * Don't create unnecessary shadow dataAlan Alpert2012-02-281-0/+3
| | | | | | | | | | | | | | | | Shadow data was being made by accident for uninitialized datums, because they had not yet had the ImageParticle set as the datum owner. Change-Id: Ia1d55610d845627cdb9c83bfda1d7ed4c024f703 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>