aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qtquick2
Commit message (Collapse)AuthorAgeFilesLines
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-24794-79656/+0
| | | | | | | | | | | | | Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Positioners cleanupAlan Alpert2012-02-222-18/+14
| | | | | | | | Use qreal for positions and spacing instead of ints, and make the positionedItems list take care of filtering out invisible items. Change-Id: Icad93ad89c848e40a70bd7a9539bd810e27020df Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Flicking a pathview with large delegate spacing is inconsistentMartin Jones2012-02-211-7/+2
| | | | | | | | | | | | The deceleration is inconsistent and dragging slowly is jerky. This was largely due to the poor resolution of the path points. pointAt() now interpolates, and the dragging logic is more accurate. Also removed the rounding of item positioning so that side-by-side items don't bounce around. Task-number: QTBUG-24312 Change-Id: I956aff0b83c3c1211d5657159c3de1e4ef0b5171 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Stabilise ListView and GridView testsBea Lam2012-02-214-92/+139
| | | | | | | | | | | | | | | | | Some tests need to wait for view to be updated before proceeding. This ensures a polish is received before proceeding - before checking through child items after initial load - after changing content y unless some other QTRY_* is already doing the job. Also fixed some tests that randomly failed for other reasons. Task-number: QTBUG-22872 QTBUG-23605 Change-Id: I2d41bf09fae09b90fd3aadbd5349e991c3339761 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Skip tst_QQuickListView::sectionsDelegate() for nowBea Lam2012-02-211-0/+2
| | | | | | | Failing occasionally Change-Id: I74fdc7f0d71a92ef2ea19df3125a362e2fa199c5 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Reduce the size of QTextPrivate.Andrew den Exter2012-02-211-5/+4
| | | | | | | | Remove some unnecessary members, store colors as QRgb values instead of QColor, and reorder members to minimise alignment padding. Change-Id: Id3958429008c97a5714734a529250fe881e2161b Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* cacheBuffer makes delegates appear briefly in wrong positionMartin Jones2012-02-211-2/+1
| | | | | | | | | Set delegates that are created asynchronously to non-visible. This would have happened the next time addVisibleItems() was called. Task-number: QTBUG-24364 Change-Id: I4b628bef186c8c41bd6a4d9e4ac402d59bcb4972 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Added QSGRenderNode class.Kim Motoyoshi Kalland2012-02-205-0/+346
| | | | | Change-Id: I8c903cae490158b864af60f53c10c10f2faea7c0 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Improve test coverage for AnchorChanges.Michael Brasser2012-02-201-4/+15
| | | | | Change-Id: If6d62febed093a07d75a6125a920aac628c35e54 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Have input method hints on only classes using themPekka Vuorela2012-02-172-4/+23
| | | | | | | | | | | Removed inputMethodHints setter and getter from QQuickItem. No need to consume memory for input method hints on every item when only QQuickTextInput and QQuickTextEdit actually use them. Additionally introduced change signals on the editor hint properties. Change-Id: Ice380d4f4dd47fdde73d2468f4a44a7d1540ad45 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com> Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* QtDeclarative/Quick: Fix warnings.Friedemann Kleint2012-02-161-1/+1
| | | | | Change-Id: I71bd638fcc41356e0b76df27ec76ad3ed5ef90d9 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Ensure visibility changes are communicated through itemChange.Michael Brasser2012-02-162-0/+45
| | | | | | | Also added MouseArea test that depends on this functionality. Change-Id: I1c303504ffd63d6b9dbdf95ab63e8426dc09c02d Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Built-in transition support for ListView & GridViewBea Lam2012-02-1615-12/+3407
| | | | | | | | | | | | | | | | | ListView and GridView can now be assigned transitions to be run when: - Populating the view (when initially setting the model / resetting) - Adding items - Removing items - Moving items The ViewTransition attached object can be used from within a transition declaration to access various information about the items that are being transitioned. Task-number: QTBUG-21504 Change-Id: Ie5c75ea511c8b15acc3f06fccf19abe34d3677f9 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix multi-length string substitution.Andrew den Exter2012-02-163-0/+96
| | | | | | | | | | Multi-length string eliding was provided by QFontMetrics::elidedText() which is no longer used for layouts. So we instead have to do the string substitution ourselves if the text doesn't fit before finally eliding. Change-Id: Iab2e54b332390290d656299a5be148f39f78df9d Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Allow binding the size of a Loader to its item.Martin Jones2012-02-162-0/+52
| | | | | | | | | | | If the size of the Loader is bound to the item, the item was resized before the binding was evaluated, resulting in an item height of 0. This change allows bindings to the item to be evaluated before we apply the resize logic. Task-number: QTBUG-22628 Change-Id: I30acdb54214b422a9d4aa4e7e02a0af3674322db Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Introduced QQuickCanvas::releaseResources().Gunnar Sletta2012-02-151-1/+3
| | | | | | | | This function can be used in certain situations to purge the texture cache and triggers more lazily to take down the scene graph and GL context Change-Id: Icd9360ff50fda0e721ba0f1b520cda678e457a35 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Improve test coverage for QQuickItem.Michael Brasser2012-02-154-0/+95
| | | | | Change-Id: I1a49fd44ba85e0fa87a76c07e39cb603cd4f12e7 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Preserve aspect ratio when setting Image.sourceSizeMartin Jones2012-02-142-0/+53
| | | | | | | | | | | Setting both sourceSize.width and sourceSize.height results in changing the image aspect ratio. This is never what you'd want. Fit the image to the provided sourceSize, maintaining the aspect ratio. Task-number: QTBUG-21161 Change-Id: I77e9aacb8d31475d5df0aef1de52c0edbd1e2fc9 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Fix access to context properties within TextEdit.cursorDelegateAndrew den Exter2012-02-148-2/+92
| | | | | | | | | | Don't create the cursorDelegate instance before componentComplete as the context may not be fully populated prior to that. Task-number: QTBUG-21780 Change-Id: I6ca8a24989bc28e5c5ca06d61a85e32ff630ce7c Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix and stabilise sectionsPositioning() testBea Lam2012-02-141-4/+13
| | | | | | | | | | | | | The 'Turn sticky footer off' part was setting the content y to 40 which meant the sect_new was already below the last visible item of the previous section, so turning off the NextLabelAtEnd flag didn't move sect_new further down the view. (This test only occasionally failed since the window didn't always update after changing the content y, but now it changes the content y then waits for a polish before continuing.) Change-Id: I6a424f4bbd2eec1904a5fd20eb2bd79d5cac5b84 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Don't crash when an animation update causes it to delete itself.Michael Brasser2012-02-132-0/+46
| | | | | Change-Id: Ic108adfb99a09e6ede71d474240fb0917cee6961 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Add basic TouchCancel handling to canvas.Laszlo Agocs2012-02-131-1/+34
| | | | | | | | | | This makes sure that touchEvent() is properly called for all items in the scene that have an active touch. It does not handle the cancel event in any other special way. Change-Id: Id66527ced8cb63d0b29f25f37c139e6d6aec9ba0 Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix anchor jitters that could occur during animation.Michael Brasser2012-02-132-1/+11
| | | | | | | | | | | | The anchors were using a different definition of center than the actual center (9337c140cab7db1285f893b66d0e56423a74c253). With this change center-anchored Rectangles may sometimes have fuzzy antialiasing again. Task-number: QTBUG-12441 Task-number: QTBUG-21730 Change-Id: Iaf61409c7c523510d0d657fe7ba96f29a8610090 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Use QInputMethod instead of deprecated QInputPanelPekka Vuorela2012-02-104-73/+89
| | | | | | | | | | Similarly deprecate Qt.application.inputPanel and introduce replacement Qt.inputMethod. Change-Id: Ie4fd467f93f75023c86b0a2d038d858fe5001146 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Sami Kananoja <sami.kananoja@nokia.com>
* Refactor Canvas rendering paths.Justin McPherson2012-02-104-45/+126
| | | | | | | Refactor Canvas rendering paths to enable different drawing contexts. Change-Id: If0e00a14baa673fca6b999a787b4e89885bb1e51 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Added new convenience readonly visibleChildren property to ItemMathias Malmqvist2012-02-102-0/+204
| | | | | | Change-Id: I5ec541226fabd72c05ce8ccb8bb7e56f6ec7717a Task-number: 22724 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Add linkColor property to Text.Andrew den Exter2012-02-091-1/+86
| | | | | | | | | | | | | | | Allows the color of links in text to be changed from the default blue. This currently only works with StyledText and the distance field rendererer. It could be made to work with RichText overwriting the specified foreground color in all instances or by not setting a default color in the html parser. The former would prevent the color being set with CSS or some future means for altering text formats. The latter would break rendering with QPainter. Task-number: QTBUG-23048 Change-Id: I98df215cabe8a089f648fd4a6206622b4318fb8f Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Don't crash if focus issues arise.Alan Alpert2012-02-091-0/+2
| | | | | | | | The test has some strict focus requirements, but if they are not met then the test should FAIL with a bit of explanation instead of crash. Change-Id: I796e8a8092833f3413b3dc98a22466575dfe241d Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Don't hide virtual method.Michael Brasser2012-02-082-10/+10
| | | | | | Task-number: QTBUG-20994 Change-Id: Iaeeb23ed758ef52e0a3a61c4310aafec383e8a28 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Allow Item components to be assigned to Item.layer.effect.Kim Motoyoshi Kalland2012-02-074-1/+76
| | | | | | | | | Some complex effects are easier to implement as Items using ShaderEffects internally rather than with a top-level ShaderEffect. Auto-tests added. Change-Id: I4b99811b87e7ca5054bf119b99207b7f5a7c666e Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Resolve StyledText img tags relative to baseUrl.Andrew den Exter2012-02-072-1/+84
| | | | | Change-Id: I954195d52330c65e851b7c0fcdb6c8dabf29335d Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Fixed some Item.layer bugs and added auto-tests.Kim Motoyoshi Kalland2012-02-077-4/+259
| | | | | Change-Id: I3f66f911d1c499c37a66904f8ddab6951ba85e60 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Separate out some of the common test codeBea Lam2012-02-0725-1205/+858
| | | | | | | | | Moves findItem, findItems() etc. into shared/visualtestutil.h and moves duplicate list model test classes and other common view-specific code into shared/viewtestutil.h. Change-Id: Ia79bc4df1ab7fb618597755c0288a2e8f5054faf Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add additional animation autotests.Michael Brasser2012-02-074-1/+279
| | | | | Change-Id: I11894325e73b8bb5b6ece4c626b15bd1d099f229 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Add contentWidth and contentHeight properties to Text elements.Andrew den Exter2012-02-073-111/+213
| | | | | | | | | | | For Text and TextEdit this is a rename of paintedWidth and paintedHeight both of which remain as synonyms of the content properties for compatability. For TextInput this is a new property. Task-number: QTBUG-23691 Task-number: QTBUG-15160 Change-Id: Idbdc72fad34922be21b649ca45fc39b5e533ed1a Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Add and use new animation backend.Michael Brasser2012-02-079-43/+165
| | | | | | | | | The new backend improves performance, and allows us to create multiple running animation jobs from a single Transition. It is based off of the existing Qt animation framework. Change-Id: Id1d0162f6e5c65bf31267f3f9f2042c354375d57 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Update test files to API changesAlan Alpert2012-02-072-3/+3
| | | | | | | | API changes are being managed, but the test files shouldn't be triggering the warning. Change-Id: Ifd6c0c08be9979d72f98eb6a1df07daf9302772e Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Ensure Flickable moving and flicking properties are correct.Martin Jones2012-02-071-1/+43
| | | | | | | | | Flicking, then touching to stop the flick should set flicking property to false. Moving or flicking vertically should not set flickingHorizontally, and vise-versa. Change-Id: Iee42a92ffff2707f0691ffa285dec514b47c9986 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Section header is not made visible when changing currentIndex.Martin Jones2012-02-071-0/+7
| | | | | | | | | Make section header visible when setting currentIndex to an item on a section boundary. Could also affect initial position if view size started at 0. Change-Id: Ie65f91826311d34a290d369d8956f1c88f7efb70 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Fix acceptance of unhandled mouse events.Simon Hausmann2012-02-061-0/+39
| | | | | | | | | | | | Mouse events not handled by the canvas need to be ignored, in order for features like touch synthetization to work. In case of the initially delivered mouse press event, the canvas did not ignore the event if it was not handled. This patch corrects that and adds an auto-test to verify the new behaviour. Change-Id: I8499701f5a161ce1e90a70303aa7ca4ccf2f0b6f Reviewed-by: Andras Becsi <andras.becsi@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix vertical offset of TextInput.positionToRectangle.Andrew den Exter2012-02-061-1/+53
| | | | | | | | | Offset the y value of the rectangle by the vertical scroll and line offset. Task-number: QTBUG-23934 Change-Id: I43815b480f43a089a9a03b0aec32dfc0598b6154 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix TextEdit vertical alignment.Andrew den Exter2012-02-061-0/+25
| | | | | | | | | | Don't ignore the position of a QTextDocument when contructing a text node, and translate the rectangle returned by positionToRectangle by the y offset. Task-number: QTBUG-23935 Change-Id: I55a2b69a32a8b623be7e36de54ad083c2f8591e5 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add support for resizing fonts to fit Text dimensions.Andrew den Exter2012-02-062-6/+582
| | | | | | | | | | | This adds a mode where if the content of a Text item doesn't fit within its bounds the font size is reduced during layout until it does or a minimum font size is reached. Task-number: QTBUG-22832 Change-Id: I6198ef03899e2f21b32e313548966ef4b0e3bff1 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com> Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Teach build system tst_qdeclarativepixmapcache needs QtConcurrentAlan Alpert2012-02-061-0/+3
| | | | | | | So if QtConcurrent is disabled, this test should be too. Change-Id: Ib4c6a952f73fc21bb201cf6017cd3e73732fbe7b Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
* Add "QT += concurrent" to a test that needs itAlex Wilson2012-02-061-1/+1
| | | | | | | | QtConcurrent became its own module in qtbase as of http://codereview.qt-project.org/15206 Change-Id: Ie9b638d83012aa83f854b92fec80d48babcf6ef0 Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
* Skip tst_qquickitem::simpleFocus on Mac OS X 10.7Yann Bodson2012-02-061-0/+5
| | | | | | | Task-number: QTBUG-24094 Change-Id: I521707891d2695d7dde8eea4ef8a6a2e3f5ea935 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Remove QtQuick1 elements from qtdeclarativeMatthew Vogt2012-02-034-136/+1
| | | | | | | | QtQuick1 is now contained in a separate repository. Task-number: QTBUG-23737 Change-Id: I09eae67af5693a22b896b916f816f73ccc3a89b1 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Adapt to QGuiApplication::focusObject() for notifying input methodPekka Vuorela2012-02-022-59/+46
| | | | | | | | | Emitting focusObjectChanged() signal now instead of explicitly setting inputItem to QInputPanel. Also adapted from deprecated QInputPanel::inputItem() to QGuiApplication::focusObject(). Change-Id: I97460625cc8bb2820ec7716a06330aecd1b585ea Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Support inline images with <img> tag in StyledTextYann Bodson2012-02-027-2/+161
| | | | | | Task-number: QTBUG-21793 Change-Id: Ie7b9f293c6c9a949c1899152c38b61251b0069d3 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Incorrect initial pos after resizing view with margins.Martin Jones2012-02-023-0/+96
| | | | | | | | | | The currentItem tracking didn't position the view to show the margins. This affects resizing the view and also changing currentIndex. Task-number: QTBUG-24028 Change-Id: I47d4c771c0d712c93abadfb6b2deb5194241fb6b Reviewed-by: Bea Lam <bea.lam@nokia.com>