aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick
Commit message (Collapse)AuthorAgeFilesLines
* Fix the build & docs after QQmlImageProvider was renamedKent Hansen2012-03-203-4/+4
| | | | | | | | The class was renamed to QQuickImageProvider in commit 3bc907d155034fe64efc8cb6056b48f0c6401bfb. Change-Id: I91ff38244cee3ab651ed6caa4140a58cb742f1c9 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Merge master into api_changesKent Hansen2012-03-1960-1058/+1102
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/qml/debugger/qqmlenginedebugservice.cpp src/qml/qml/v8/qv8qobjectwrapper.cpp src/quick/util/qquickimageprovider.cpp tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp Change-Id: Ie78ba2fabd32f4812bcae9dbdd66ed289dc11dcb
| * QmlDebugging: Object Tree and States ListAurindam Jana2012-03-191-11/+6
| | | | | | | | | | | | | | | | | | All created instances are stored under the root context. Check for the creation context of the object when building up the tree. Do the same when building up the states list. Change-Id: I8716d9966a61b8f7cb3ad4b7ab5acd4c94b4cd03 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
| * Resetting a model can cause a crash in views with header/footer.Martin Jones2012-03-194-25/+43
| | | | | | | | | | | | | | Geometry listeners were called for deleted header/footer. Change-Id: I47854178232f8a4ab5e19a931901b49741fec388 Reviewed-by: Bea Lam <bea.lam@nokia.com>
| * Ensure section header/footer are cleaned up.Martin Jones2012-03-191-4/+8
| | | | | | | | | | | | | | | | If the model is cleared or replaced with an empty one, the section headers should be released. Change-Id: Ia2f070c312593743b2c5332a6c69facaf222ee6d Reviewed-by: Bea Lam <bea.lam@nokia.com>
| * Don't crash view while changing model.Martin Jones2012-03-191-1/+1
| | | | | | | | | | | | | | | | | | Set model to null before adjusting view position, as changing position can trigger a refill() if the view is animating at that instance. Change-Id: I4bc20766b1ab906799213b149c84a1bdb268c200 Reviewed-by: Bea Lam <bea.lam@nokia.com>
| * Fix grabbing to wait until the image has actually been grabbed.Michael Brasser2012-03-191-11/+1
| | | | | | | | | | Change-Id: I3535c57b5d8dd99c8a6cf24ccb1b56af298fcfe6 Reviewed-by: Martin Jones <martin.jones@nokia.com>
| * Allow threaded compilation in an async LoaderMartin Jones2012-03-151-2/+7
| | | | | | | | | | | | | | Enables threaded compilation for a Loader "source". Change-Id: I2d60a3ace07aab58f3b8f069e45a2864178c959f Reviewed-by: Chris Adams <christopher.adams@nokia.com>
| * Support for multiple textures in the default distance field glyph cache.Yoann Lopes2012-03-152-51/+94
| | | | | | | | | | | | | | | | | | | | The default implementation of the distance field glyph cache can now store the glyphs of one font in several textures, allowing to cache more glyphs at once. The default maximum number of textures per cache is 3. Glyphs are recycled when all textures are full. Change-Id: I28d2d6cf5aa409141e2700b505023f15d3c2cd26 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
| * Don't assert if focus is already clear.Alan Alpert2012-03-151-2/+6
| | | | | | | | | | | | | | | | | | Already cleared focus should exit the function without terminating the runtime. Task-number: QTBUG-24714 Change-Id: Ia8c6be0d88e43d1f71112acc7bac3eb674f22de8 Reviewed-by: Martin Jones <martin.jones@nokia.com>
| * Don't leak function objects created by VisualDataModel.Andrew den Exter2012-03-153-22/+22
| | | | | | | | | | | | | | | | | | | | Function objects created from a FunctionTemplate are not short lived, and the objects created by a VisualDataModel can change between instances meaning a template is needed per instance. So use an object template as a constructor instead of a function. Change-Id: I364c6e4f714a623b7adb7475a3ee9862eeeeb119 Reviewed-by: Martin Jones <martin.jones@nokia.com>
| * Set more sensible Flickable default input filtering parametersMartin Jones2012-03-151-4/+4
| | | | | | | | | | | | | | | | | | Shouldn't throw anything away by default. Also fix bug that flicking back into bounds from outside bounds halved velocity. Change-Id: I3c2d303a9e46910439dc8bfb01771376f634a684 Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com> Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
| * Remove binding dependency on QQmlExpressionAaron Kennedy2012-03-153-14/+14
| | | | | | | | | | | | | | | | This is the first step to creating much lighter weight bindings that are tuned for the specific scenario in which they're used. Change-Id: Ib985dcff25679b711b5c634bbc891aa7902bf405 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
| * Don't store duplicate glyph data in a distance field node.Andrew den Exter2012-03-142-40/+31
| | | | | | | | | | | | | | | | This saves at least 16 bytes per character and removes the need to copy data between representations. Change-Id: Ia8236207bdc4ed8292f7b4c72093ee02d13c0463 Reviewed-by: Yoann Lopes <yoann.lopes@nokia.com>
| * Remove all accessibility updates to allow changes in qtbase.Frederik Gladhorn2012-03-144-16/+0
| | | | | | | | | | | | | | | | In order to integrate pending api changes these are temporarily removed and will return fixed as soon as qtbase is up to date. Change-Id: I558b6049ac3342d41d67441ddfba6821fc370533 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
| * Fix memory leak with the shared distance field glyph cache.Andrew den Exter2012-03-143-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A new glyph node instance registers its owner element with its glyph cache which in the case of the shared distance field glyph cache connects a signal from the cache to a slot on the owner, changing the text creates a new node but destroying the old node didn't remove the connection causing them to accumulate over time. In the glyph node; unregister the owner element from the cache on destruction, and in the cache only connect an owner element the first time it is registered and keep a reference count so the items can be disconnected when registrations from all nodes have been cancelled. Change-Id: Ibf32a146e146dbbf4e0556d1bd756465bd8e45ba Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
| * Fix wrap modes not being set.Gunnar Sletta2012-03-141-1/+1
| | | | | | | | | | Change-Id: Id75ae3f01e6ed72b4a754e05bd55d5ed73b56920 Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
| * Remove use of redundante nullPixmap image referenceGunnar Sletta2012-03-141-3/+1
| | | | | | | | | | Change-Id: I40b82c25c813722a94d9897e1f2e1dd8a1681762 Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
| * More refactoring on animation controllerCharles Yin2012-03-131-0/+2
| | | | | | | | | | | | | | | | | | Add a flag and helper functions for disabling user control in QAbstractAnimationJob class and make it synchronized with QDeclarativeAnimation class's disableUserControl flag. Change-Id: Ifa84ab0c78291941469c33f2cafe5f61ee718b2c Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
| * Remove the usage of deprecated qdoc macros.Casper van Donderen2012-03-1340-830/+830
| | | | | | | | | | | | | | | | | | | | QDoc now has support for Doxygen style commands for italics, bold and list items. This change applies that change in QDoc to the actual documentation. Task-number: QTBUG-24578 Change-Id: I62d203f21df63a95ee236e578b10418fd9680707 Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
| * Send accessibility updates for the right item.Frederik Gladhorn2012-03-134-7/+7
| | | | | | | | | | | | | | | | Child 0 means the first child. The index needs to be -1 which the default ctor does. Change-Id: I71fbdf5a15dd4593178cb250f06d42f601e40d4d Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
| * Remove unused init function.Andrew den Exter2012-03-132-14/+0
| | | | | | | | | | Change-Id: Id66e177a544fd8e019bae86fff6bd04bd0497d7c Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* | Adapt to Qt5 meta-object changesKent Hansen2012-03-132-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QMetaMethod::signature() has been renamed to methodSignature(), and it now returns a QByteArray. Also, the new function QMetaMethod::isValid() should be used to determine whether a method is valid, instead of relying on signature() returning a 0 pointer. Where it makes sense, the existing code that was using signature() and parameterTypes() has been changed to use the new API QMetaMethod::name(), parameterCount(), and parameterType(int). Also, in the new meta-object revision (7), the QMetaObject stringdata member is now of type QByteArrayData*. QFastMetaBuilder will be ported to generate the new format, but for now it's sufficient to reinterpret_cast the stringdata assignment to keep it compiling. Change-Id: Ie340ef17bcebc3afa4aae6450dfe2d06e4d881a4 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* | Merge branch 'master' of git://gitorious.org/qt/qtdeclarative into merge-masterMatthew Vogt2012-03-1312-52/+134
|\| | | | | | | Change-Id: Iaefec13503dadfa200539b8de7a2d80fc5bb3bcf
| * ListView.contentHeight does not include header and footer item heightsMartin Jones2012-03-131-2/+3
| | | | | | | | | | | | | | Task-number: QTBUG-24664 Change-Id: I2a2fe144835e61665b8693d58ca4fb9ba506e8a8 Reviewed-by: Bea Lam <bea.lam@nokia.com>
| * Displaced items were moving unnecessarilyBea Lam2012-03-132-28/+66
| | | | | | | | | | | | | | | | | | | | | | | | They should only move if they actually change from the last set position, and not if they are simply changing from their current item position, as that is wrong during an animation. This also cleans up some code for resetting the transition data. Task-number: QTBUG-24586 Change-Id: I0a6635903975ebc40d5cf8398b943a9de92d4493 Reviewed-by: Martin Jones <martin.jones@nokia.com>
| * Improve interaction of nested Flickables and PathViewMartin Jones2012-03-135-18/+43
| | | | | | | | | | | | | | | | | | Don't require a flick to come to a complete stop before allowing another flickable element to begin its gesture. Change-Id: I74c1998e01e04c70c76253cd09edc02f593123d0 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
| * Declare change set and compositor structs as movable primative types.Andrew den Exter2012-03-132-0/+9
| | | | | | | | | | | | | | | | Allows QVector to avoid invoking contructors for these types unnecessarily. Change-Id: Icc8670e4a033c943666f907c7e1b006a3d205597 Reviewed-by: Bea Lam <bea.lam@nokia.com>
| * Change repeater item to handle model being deleted.Glenn Watson2012-03-132-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | The repeater item previously stored a raw QObject pointer in a variant. When this pointer was a dynamic list model element that was deleted, the variant would continue to hold a stale pointer. Change repeater to use a guard object to hold the model when it is a QObject. Continue to use a variant to hold models that are not based on QObject to maintain same semantics. Change-Id: Ie100947132923803263c725e86efa68206382f12 Reviewed-by: Martin Jones <martin.jones@nokia.com>
| * Fix for QTBUG-22777. Removed unnecessary check.Gatis Paeglis2012-03-121-1/+1
| | | | | | | | | | Change-Id: I82de9e1d6eb4b8bdb8c90c69e686b700a02f40aa Reviewed-by: Martin Jones <martin.jones@nokia.com>
| * Fix double click handler in QQuickItem.Laszlo Agocs2012-03-121-2/+1
| | | | | | | | | | | | | | | | | | | | | | The legacy, desktop-oriented way of calling mousePressed from the default handlers for mouseDoubleClick is not working properly with QWindow and QGuiApplication: In Qt 5 a double click will never suppress any lower level events (like press or release) and therefore simulating a mouse press in the double click handlers is wrong. Change-Id: Ic0ad97a5efbcd3deb1717229010dcb84681d7ed4 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* | Merge branch 'master' of git://gitorious.org/qt/qtdeclarative into api_changesMatthew Vogt2012-03-1217-112/+478
|\| | | | | | | Change-Id: I578b1e2f1bb374da6194e6ba04a0fd459b2632fe
| * refilled items should be moved immediatelyBea Lam2012-03-106-16/+21
| | | | | | | | | | | | | | | | | | refill() functionality should reposition items immediately, else removeNonVisibleItems() sees different positions from those added in addVisibleItems() if an item is animating. Change-Id: Ib9904e08bf92b18fd4b712270c0ab69e9a113e04 Reviewed-by: Martin Jones <martin.jones@nokia.com>
| * Clean up transition objects for positionersBea Lam2012-03-103-4/+29
| | | | | | | | | | | | | | | | These must be cleaned up whenever items are removed from the internal PositionedItem lists. Change-Id: I56f64a29bd98c603b00faaead514fd43780c18de Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
| * Add mouse wheel events handler to MouseAreaLuis Gabriel Lima2012-03-107-2/+185
| | | | | | | | | | | | | | | | | | | | | | | | This patch was based on the attached patch in QTBUG-7369. It basically exposes the wheel events to MouseArea via the onWheel signal. The current API is based on the new QWheelEvent API introduced by this patch: http://codereview.qt-project.org/#change,12532 Task-number: QTBUG-7369 Change-Id: Id58513715c2d0ae81e3a69e9e1ed400bbae07507 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
| * Avoid using QQuickViewItem as base classBea Lam2012-03-108-92/+225
| | | | | | | | | | | | | | | | | | | | This patch renames it to QQuickItemViewTransitionableItem, and FxViewItem and PositionedItem now create instances of this instead of subclassing it, to reduce the memory used when transitions are not required. Change-Id: Ie050cda5a121bff9542c7ba7356f6eacf37d241a Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
| * Reset transitioner pointer when transition job finishesBea Lam2012-03-091-1/+13
| | | | | | | | | | | | | | | | | | A transition job should only keep a reference to the transitioner for the lifetime of the transition. Change-Id: I22564d7b6587fed58ef53fd50ad4a700340dc7a4 Reviewed-by: Martin Jones Reviewed-by: Martin Jones <martin.jones@nokia.com>
| * 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>
* | Merge remote-tracking branch 'origin/master' into api_changesLars Knoll2012-03-0736-595/+432
|\| | | | | | | Change-Id: I121cb9c9316b5e47476dcb982bc28b6f3f358f78
| * 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>