aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls/data/tst_swipedelegate.qml
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-08-03 07:58:19 +0200
committerLiang Qi <liang.qi@qt.io>2016-08-03 10:23:11 +0200
commite9855d8ac8afed5371330f4f83f7b7dd51d9026f (patch)
treec1f70cbc64d9fe5d07911601880c571b4d3cd8f0 /tests/auto/controls/data/tst_swipedelegate.qml
parent508bb6ddde831fb0d0b7065b39d99be01b4e4771 (diff)
parent1b7b2d7ddb6a02fd2ccd1f29a431005b9e693723 (diff)
Merge remote-tracking branch 'origin/5.7' into dev
Also update expected line numbers in tst_swipedelegate. Conflicts: .qmake.conf src/quicktemplates2/qquicktextarea.cpp src/quicktemplates2/qquicktextarea_p.h tests/auto/controls/data/tst_swipedelegate.qml Change-Id: I36323e3a633c1c750d23014e56a7c881963a1a30
Diffstat (limited to 'tests/auto/controls/data/tst_swipedelegate.qml')
-rw-r--r--tests/auto/controls/data/tst_swipedelegate.qml81
1 files changed, 81 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_swipedelegate.qml b/tests/auto/controls/data/tst_swipedelegate.qml
index 17aab877..255c1d6d 100644
--- a/tests/auto/controls/data/tst_swipedelegate.qml
+++ b/tests/auto/controls/data/tst_swipedelegate.qml
@@ -1161,4 +1161,85 @@ TestCase {
control.destroy();
}
+
+ Component {
+ id: backgroundFillComponent
+ SwipeDelegate {
+ background: Item { anchors.fill: parent }
+ }
+ }
+
+ Component {
+ id: backgroundCenterInComponent
+ SwipeDelegate {
+ background: Item { anchors.centerIn: parent }
+ }
+ }
+
+ Component {
+ id: backgroundLeftComponent
+ SwipeDelegate {
+ background: Item { anchors.left: parent.left }
+ }
+ }
+
+ Component {
+ id: backgroundRightComponent
+ SwipeDelegate {
+ background: Item { anchors.right: parent.right }
+ }
+ }
+
+ Component {
+ id: contentItemFillComponent
+ SwipeDelegate {
+ contentItem: Item { anchors.fill: parent }
+ }
+ }
+
+ Component {
+ id: contentItemCenterInComponent
+ SwipeDelegate {
+ contentItem: Item { anchors.centerIn: parent }
+ }
+ }
+
+ Component {
+ id: contentItemLeftComponent
+ SwipeDelegate {
+ contentItem: Item { anchors.left: parent.left }
+ }
+ }
+
+ Component {
+ id: contentItemRightComponent
+ SwipeDelegate {
+ contentItem: Item { anchors.right: parent.right }
+ }
+ }
+
+ function test_horizontalAnchors_data() {
+ return [
+ { tag: "background, fill", component: backgroundFillComponent, itemName: "background", warningLocation: ":1168:25" },
+ { tag: "background, centerIn", component: backgroundCenterInComponent, itemName: "background", warningLocation: ":1175:25" },
+ { tag: "background, left", component: backgroundLeftComponent, itemName: "background", warningLocation: ":1182:25" },
+ { tag: "background, right", component: backgroundRightComponent, itemName: "background", warningLocation: ":1189:25" },
+ { tag: "contentItem, fill", component: contentItemFillComponent, itemName: "contentItem", warningLocation: ":1196:26" },
+ { tag: "contentItem, centerIn", component: contentItemCenterInComponent, itemName: "contentItem", warningLocation: ":1203:26" },
+ { tag: "contentItem, left", component: contentItemLeftComponent, itemName: "contentItem", warningLocation: ":1210:26" },
+ { tag: "contentItem, right", component: contentItemRightComponent, itemName: "contentItem", warningLocation: ":1217:26" }
+ ];
+ }
+
+ function test_horizontalAnchors(data) {
+ var warningMessage = Qt.resolvedUrl("tst_swipedelegate.qml") + data.warningLocation
+ + ": QML : SwipeDelegate: cannot use horizontal anchors with " + data.itemName + "; unable to layout the item."
+
+ ignoreWarning(warningMessage);
+
+ var control = data.component.createObject(testCase);
+ verify(control.contentItem);
+
+ control.destroy();
+ }
}