aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicklayouts
Commit message (Collapse)AuthorAgeFilesLines
* Fix items in layouts not being rendered when layers are usedMitch Curtis2018-07-092-0/+96
| | | | | | | | | | | | | | | | A layer effect is apparently considered a child item of the layout that manages the item, and this causes issues when layouting. As was done for positioners in 865b4ec8, exclude any items for which QQuickItemPrivate::isTransparentForPositioner() returns true from layouting. As that commit made QQuickItemLayer set it to true when the layer is enabled, QQuickShaderEffectSource will be excluded from layouting. Task-number: QTBUG-63269 Change-Id: I463ff8d0cea0dfd6c4273f376de347971040d3d0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Add testcase for how align-to-pixel affects size hint normalizationJan Arve Sæther2018-03-021-0/+17
| | | | | Change-Id: I404b06daa5202f6cca887dc63dc4c86d432dd1e5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix flaky test - wait for the LayoutRequest to arriveJan Arve Sæther2018-03-011-0/+1
| | | | | Change-Id: I5fb8419bc86f0355ca19957456d2a3ebba3c9ef3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Move test for ignoreMessage to the topJan Arve Sæther2018-02-281-62/+60
| | | | | | | This should make it more robust to changes in line numbers Change-Id: I8394fce060e05226d02af0dad5f7d8d9552bc63b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* test_defaultPropertyAliasCrash(): fix anchor warningsMitch Curtis2018-02-201-1/+0
| | | | | | | | The item was trying to center itself within a layout for some reason. Change-Id: I7a4bdf0fdce91cd1dad6ec9c5ae27a5fbe07408f Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Layout: improve warning message when anchors are detectedMitch Curtis2018-02-201-1/+2
| | | | | | | | | | - Use the more explicit term "manage" to make it clear that the warning only applies to items that are direct children of a layout type. - Instruct users towards the proper way to position items within a layout: Layout.alignment. Change-Id: Id13af95457a689e41aeaead1f9a0f958f095fca9 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Only warn about actual *anchors* in layout childrenJan Arve Sæther2018-02-191-0/+61
| | | | | | | | | | | Do not warn if they don't actually pose a problem, such as having just anchors.margins: 42 in a layout child item (as demonstrated by the test) Change-Id: I01e4515e91d7d0df3ae6bf9061cebe5c51802998 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Fix positioning and placement of initially invisible items in layoutsSascha Siebert2017-11-221-0/+35
| | | | | | | | | | | Instead of misusing implicitWidth/Height as a storage mechanism in scenarios where width/height is used for preferred size evaluation, new members are created to hold this information to prevent incorrect sizing in mentioned scenario and get rid of blocking signals. Task-number: QTBUG-57455 Change-Id: I102c45805c4106e5829b17b65c2e247b2381573f Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Fix outdated BSD license headerKai Koehne2017-10-174-10/+50
| | | | | Change-Id: Icc08925454445fc9497fb3bfd2c26efe90605983 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* QQuickLayout: ensure that all change listeners are removedMitch Curtis2017-02-223-0/+111
| | | | | | | | | | | | | | | | | | The first fix for QTBUG-51927 (59c6c0e0) went to 5.6.2, where only the SiblingOrder ChangeType was listened to by QQuickLayout. It was then cherry-picked to 5.7 (5149aa68), where SiblingOrder was still the only ChangeType in use. 3b4f00ec then optimized QQuickLayout by swapping connections for item change listeners, but didn't check for usages of change types elsewhere in the file. This patch moves the change types into a variable that ensures there is one place for future changes. 5.6 is not affected. Task-number: QTBUG-51927 Change-Id: Ifd6e0545ce543ab79d6415e007b35c457cacc83a Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* StackLayout: propagate rearrange() call to child layoutsOleg Yadrov2017-01-192-1/+109
| | | | | | Task-number: QTBUG-57867 Change-Id: I0190b892e2bc2966b82a0dbd99e53fd9d6848957 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Avoid needless notifications when destroying layoutsJan Arve Saether2017-01-121-0/+21
| | | | | | | | | | | | | | | | | When deleting a layout with children, it ends up in ~QQuickItem(), which in turn will call setParentItem(0). setParentItem(0) will in turn call setEffectiveVisibleRecur(), which will recurse down all its descendants. Therefore, deleting a top level layout might trigger item change listeners for *all* its descendants, not only its direct children. This behavior might even cause crashes: The visibility changes will then trigger an invalidation of the layout, which will propagate up the parent hierarchy, and potentially call invalidate() on a partially-destroyed layout, which then might crash. Change-Id: I48e11d57f69e9011ced6c3a0b51e3d89b24ad5c1 Task-number: QTBUG-55103 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix crash on exit when using default property aliases with layoutsMitch Curtis2016-09-153-0/+120
| | | | | | | | | | | | | | The layout was being destroyed before the text, which meant that the removeItemChangeListener() call never got hit. To ensure that the listener is always removed, loop through each child in QQuickLayout's destructor. This is a manual cherry-pick of 59c6c0e0b1b5b46747595a58e11311b7393d7e70. Task-number: QTBUG-51927 Change-Id: I669f42beb8c3dd6b4b741cae0b16e017bb3409df Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Add more tests for pixel snapping of sizesJan Arve Sæther2016-03-021-0/+31
| | | | | | Task-number: QTBUG-41216 Change-Id: I4456709ec5c4e61183fb4056a5f6d6bd9bd863d5 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Change test because of slight behavior change in the layout engineJan Arve Sæther2016-03-011-1/+1
| | | | | | | | | The test was assuming that pixel snapping did not change the minimum size hint of the layout. An upcoming patch to qtbase will change that. Change-Id: I53bed57d086aa9ba9972188b014140c95d7669b9 Task-number: QTBUG-41216 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* Make test more data drivenJan Arve Sæther2016-03-011-43/+21
| | | | | Change-Id: Ia1c2d53c77da29337b4453046ddb3d526c7015e4 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* Move QtQuick.Layouts to qtdeclarative from qtquickcontrolsJan Arve Saether2016-02-264-0/+1999
This is in order for it to be available without having to install Qt Quick Controls Change-Id: I3f0d0dc108829947cd189b7861944e556e00cef3 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>