aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls/data/tst_container.qml
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.9' into 5.10J-P Nurmi2017-10-221-3/+27
|\ | | | | | | Change-Id: I9188f94e40e2ecb4da1963ce2fcf915ab7a4b4fb
| * QQuickContainer: fix itemSiblingOrderChanged()J-P Nurmi2017-10-171-3/+27
| | | | | | | | | | | | | | | | | | | | | | The problem was that QQuickContainer started already moving items while QQmlObjectModel was creating items and QQuickRepeater was initializing the order. Don't reorder items during the creation, but only after component completion. Task-number: QTBUG-61310 Change-Id: I13380c5ab6b3bddaad3fa03ef6fb028622b4cd11 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devJ-P Nurmi2017-06-151-0/+27
|\| | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/ButtonGroup.qml tests/auto/controls/data/tst_container.qml tests/auto/menu/tst_menu.cpp Change-Id: Ie8ee7e4f83f3fda6a09507b060576ebda929a7cd
| * Fix QQuickContainerPrivate::itemSiblingOrderChanged()J-P Nurmi2017-06-081-0/+27
| | | | | | | | | | | | | | | | | | Repeaters are not part of the content model. Exclude them when calculating the target index when the order of items changes. Task-number: QTBUG-61310 Change-Id: Iaedd59288ed38e985a34ed8e1f515fdfb50d74e6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickContainer: removeItem(Item) and takeItem(int)J-P Nurmi2017-06-061-0/+42
|/ | | | | | | | | | | | | | | | | | | | | | | | Deprecate removeItem(int) in favor of removeItem(Item) and takeItem(int) with clearer semantics. If one already has access to an item, one can pass it to removeItem() to get rid of it for good, instead of having to call destroy() by hand. If one knows the index instead, we provide a way to take the respective item out of the container, and let the user decide what to do with it. This way we provide convenient ways to remove & destroy items in one go, and to take items out without destroying them. This nice pattern was once upon time planned for the QQC1 containers such as SplitView, and should have been used for the QQC2 containers, but was simply forgotten during the development... [ChangeLog][Controls][Container] Deprecated removeItem(int) in favor of removeItem(Item) and takeItem(int) with clearer semantics. The former destroys the item, whereas the latter transfers ownership to the caller. Change-Id: I4af51157b196c273f923d99b949a9660e6e8df64 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Container: document and test current index managementJ-P Nurmi2017-04-271-0/+36
| | | | | Change-Id: I368dd50a4ded743826d6dc4d25dde379c98af20d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Update license headers to silence qtqa/tst_license warningsJ-P Nurmi2017-02-241-2/+12
| | | | | | | | | | Sync with the qtbase/header.XXX. The license headers were matching qtbase/header.XXX-OLD, which makes qtqa/tst_license flood warnings: Old license being used for foo.qdoc Change-Id: I199bf303a2d648e0d5f7bc01cb0814a5f945eeff Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* tst_controls: update import versions for controls and templatesJ-P Nurmi2017-01-121-2/+2
| | | | | Change-Id: I104bc44c361351719449cab94dcb14c96e91e32f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2017-01-111-1/+1
|\ | | | | | | Change-Id: If797ac58344b20e8de4379343131c097247ba2f2
| * Welcome to 2017J-P Nurmi2017-01-091-1/+1
| | | | | | | | | | Change-Id: If68cff4efacc7dc5719c8b8e61937e85e9076870 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | tst_container: use TestCase's new createTemporaryObject functionsMitch Curtis2016-12-161-4/+2
|/ | | | | | | | This ensures that the appropriate objects are destroyed at the end of each test function, even if the test fails. Change-Id: I6d446a7aacf22c66de97d320dc050c9ec10600a0 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Remove wrong Container revision registrationJ-P Nurmi2016-10-051-2/+2
| | | | | | | | | | | | | We register Container.qml for QtQuick.Controls 2.0, so it is important to not override the registration with plain QQuickContainer template revision 1 for QtQuick.Controls 2.1, or else the behavior of Container will be different depending on whether the user imports QtQuick Controls 2.0 or 2.1. The auto test started failing when the import version was bumped from 2.0 to 2.1. This revealed that "Container" was pointing to Container.qml in 2.0, and to QQuickContainer in 2.1. Change-Id: I80b8de3bf556c57e4ae853b116d387431dfa02c7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Make a plain Container calculate suitable implicit sizeJ-P Nurmi2016-08-311-0/+85
[ChangeLog][Controls][Container] A plain Container now calculates its implicit size based on the implicit size of the content item plus paddings, and the implicit size of the background item. Change-Id: I0481aef0ce713d92bee8b119bf5158dea612d598 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>