aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-09-14 23:53:12 +0200
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-10-09 22:23:40 +0000
commitad471146a715299bd3acab69f0cacb8a58d72d84 (patch)
tree83d4f396d0e162b66c23536e7e47177d784baec0 /tests/auto/controls
parent7145fc86a8180c1a118b33925f141782559c8f76 (diff)
Attached properties are now available using the QML composite type name
Change-Id: I8cfbd420cea4e01528d2f289cfc5989268d8718a Task-number: QTBUG-43581 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'tests/auto/controls')
-rw-r--r--tests/auto/controls/data/tst_scrollbar.qml5
-rw-r--r--tests/auto/controls/data/tst_scrollindicator.qml5
-rw-r--r--tests/auto/controls/data/tst_stackview.qml63
-rw-r--r--tests/auto/controls/data/tst_swipeview.qml17
-rw-r--r--tests/auto/controls/data/tst_tumbler.qml11
5 files changed, 48 insertions, 53 deletions
diff --git a/tests/auto/controls/data/tst_scrollbar.qml b/tests/auto/controls/data/tst_scrollbar.qml
index 842cd9ff..5baa0ba9 100644
--- a/tests/auto/controls/data/tst_scrollbar.qml
+++ b/tests/auto/controls/data/tst_scrollbar.qml
@@ -41,7 +41,6 @@
import QtQuick 2.2
import QtTest 1.0
import Qt.labs.controls 1.0
-import Qt.labs.templates 1.0 as T
TestCase {
id: testCase
@@ -95,7 +94,7 @@ TestCase {
compare(vertical.active, false)
compare(vertical.orientation, Qt.Vertical)
- container.T.ScrollBar.vertical = vertical
+ container.ScrollBar.vertical = vertical
compare(vertical.parent, container)
compare(vertical.orientation, Qt.Vertical)
compare(vertical.size, container.visibleArea.heightRatio)
@@ -108,7 +107,7 @@ TestCase {
compare(horizontal.active, false)
compare(horizontal.orientation, Qt.Vertical)
- container.T.ScrollBar.horizontal = horizontal
+ container.ScrollBar.horizontal = horizontal
compare(horizontal.parent, container)
compare(horizontal.orientation, Qt.Horizontal)
compare(horizontal.size, container.visibleArea.widthRatio)
diff --git a/tests/auto/controls/data/tst_scrollindicator.qml b/tests/auto/controls/data/tst_scrollindicator.qml
index ac320117..71e09784 100644
--- a/tests/auto/controls/data/tst_scrollindicator.qml
+++ b/tests/auto/controls/data/tst_scrollindicator.qml
@@ -41,7 +41,6 @@
import QtQuick 2.2
import QtTest 1.0
import Qt.labs.controls 1.0
-import Qt.labs.templates 1.0 as T
TestCase {
id: testCase
@@ -80,7 +79,7 @@ TestCase {
compare(vertical.active, false)
compare(vertical.orientation, Qt.Vertical)
- container.T.ScrollIndicator.vertical = vertical
+ container.ScrollIndicator.vertical = vertical
compare(vertical.parent, container)
compare(vertical.orientation, Qt.Vertical)
compare(vertical.size, container.visibleArea.heightRatio)
@@ -93,7 +92,7 @@ TestCase {
compare(horizontal.active, false)
compare(horizontal.orientation, Qt.Vertical)
- container.T.ScrollIndicator.horizontal = horizontal
+ container.ScrollIndicator.horizontal = horizontal
compare(horizontal.parent, container)
compare(horizontal.orientation, Qt.Horizontal)
compare(horizontal.size, container.visibleArea.widthRatio)
diff --git a/tests/auto/controls/data/tst_stackview.qml b/tests/auto/controls/data/tst_stackview.qml
index 7ef13535..f54cd9ae 100644
--- a/tests/auto/controls/data/tst_stackview.qml
+++ b/tests/auto/controls/data/tst_stackview.qml
@@ -41,7 +41,6 @@
import QtQuick 2.2
import QtTest 1.0
import Qt.labs.controls 1.0
-import Qt.labs.templates 1.0 as T
TestCase {
id: testCase
@@ -108,23 +107,23 @@ TestCase {
verify(control)
var item1 = component.createObject(control)
- compare(item1.T.StackView.status, StackView.Inactive)
+ compare(item1.StackView.status, StackView.Inactive)
control.push(item1)
- compare(item1.T.StackView.status, StackView.Active)
+ compare(item1.StackView.status, StackView.Active)
var item2 = component.createObject(control)
- compare(item2.T.StackView.status, StackView.Inactive)
+ compare(item2.StackView.status, StackView.Inactive)
control.push(item2)
- compare(item2.T.StackView.status, StackView.Activating)
- compare(item1.T.StackView.status, StackView.Deactivating)
- tryCompare(item2.T.StackView, "status", StackView.Active)
- tryCompare(item1.T.StackView, "status", StackView.Inactive)
+ compare(item2.StackView.status, StackView.Activating)
+ compare(item1.StackView.status, StackView.Deactivating)
+ tryCompare(item2.StackView, "status", StackView.Active)
+ tryCompare(item1.StackView, "status", StackView.Inactive)
control.pop()
- compare(item2.T.StackView.status, StackView.Deactivating)
- compare(item1.T.StackView.status, StackView.Activating)
- tryCompare(item2.T.StackView, "status", StackView.Inactive)
- tryCompare(item1.T.StackView, "status", StackView.Active)
+ compare(item2.StackView.status, StackView.Deactivating)
+ compare(item1.StackView.status, StackView.Activating)
+ tryCompare(item2.StackView, "status", StackView.Inactive)
+ tryCompare(item1.StackView, "status", StackView.Active)
control.destroy()
}
@@ -134,19 +133,19 @@ TestCase {
verify(control)
var item1 = component.createObject(control)
- compare(item1.T.StackView.index, -1)
+ compare(item1.StackView.index, -1)
control.push(item1, StackView.Immediate)
- compare(item1.T.StackView.index, 0)
+ compare(item1.StackView.index, 0)
var item2 = component.createObject(control)
- compare(item2.T.StackView.index, -1)
+ compare(item2.StackView.index, -1)
control.push(item2, StackView.Immediate)
- compare(item2.T.StackView.index, 1)
- compare(item1.T.StackView.index, 0)
+ compare(item2.StackView.index, 1)
+ compare(item1.StackView.index, 0)
control.pop(StackView.Immediate)
- compare(item2.T.StackView.index, -1)
- compare(item1.T.StackView.index, 0)
+ compare(item2.StackView.index, -1)
+ compare(item1.StackView.index, 0)
control.destroy()
}
@@ -156,19 +155,19 @@ TestCase {
verify(control)
var item1 = component.createObject(control)
- compare(item1.T.StackView.view, null)
+ compare(item1.StackView.view, null)
control.push(item1, StackView.Immediate)
- compare(item1.T.StackView.view, control)
+ compare(item1.StackView.view, control)
var item2 = component.createObject(control)
- compare(item2.T.StackView.view, null)
+ compare(item2.StackView.view, null)
control.push(item2, StackView.Immediate)
- compare(item2.T.StackView.view, control)
- compare(item1.T.StackView.view, control)
+ compare(item2.StackView.view, control)
+ compare(item1.StackView.view, control)
control.pop(StackView.Immediate)
- compare(item2.T.StackView.view, null)
- compare(item1.T.StackView.view, control)
+ compare(item2.StackView.view, null)
+ compare(item1.StackView.view, control)
control.destroy()
}
@@ -275,11 +274,11 @@ TestCase {
verify(control)
// missing arguments
- ignoreWarning(Qt.resolvedUrl("tst_stackview.qml") + ":60:9: QML StackView: push: missing arguments")
+ ignoreWarning(Qt.resolvedUrl("tst_stackview.qml") + ":59:9: QML StackView: push: missing arguments")
compare(control.push(), null)
// nothing to push
- ignoreWarning(Qt.resolvedUrl("tst_stackview.qml") + ":60:9: QML StackView: push: nothing to push")
+ ignoreWarning(Qt.resolvedUrl("tst_stackview.qml") + ":59:9: QML StackView: push: nothing to push")
compare(control.push(StackView.Immediate), null)
// push(item)
@@ -333,7 +332,7 @@ TestCase {
control.push(items, StackView.Immediate)
- ignoreWarning(Qt.resolvedUrl("tst_stackview.qml") + ":60:9: QML StackView: pop: too many arguments")
+ ignoreWarning(Qt.resolvedUrl("tst_stackview.qml") + ":59:9: QML StackView: pop: too many arguments")
compare(control.pop(1, 2, 3), null)
// pop the top most item
@@ -352,7 +351,7 @@ TestCase {
compare(control.currentItem, items[2])
// don't pop non-existent item
- ignoreWarning(Qt.resolvedUrl("tst_stackview.qml") + ":60:9: QML StackView: pop: unknown argument: " + testCase)
+ ignoreWarning(Qt.resolvedUrl("tst_stackview.qml") + ":59:9: QML StackView: pop: unknown argument: " + testCase)
compare(control.pop(testCase, StackView.Immediate), null)
compare(control.depth, 3)
compare(control.currentItem, items[2])
@@ -370,11 +369,11 @@ TestCase {
verify(control)
// missing arguments
- ignoreWarning(Qt.resolvedUrl("tst_stackview.qml") + ":60:9: QML StackView: replace: missing arguments")
+ ignoreWarning(Qt.resolvedUrl("tst_stackview.qml") + ":59:9: QML StackView: replace: missing arguments")
compare(control.replace(), null)
// nothing to push
- ignoreWarning(Qt.resolvedUrl("tst_stackview.qml") + ":60:9: QML StackView: replace: nothing to push")
+ ignoreWarning(Qt.resolvedUrl("tst_stackview.qml") + ":59:9: QML StackView: replace: nothing to push")
compare(control.replace(StackView.Immediate), null)
// replace(item)
diff --git a/tests/auto/controls/data/tst_swipeview.qml b/tests/auto/controls/data/tst_swipeview.qml
index 71731ae9..a17b9fc0 100644
--- a/tests/auto/controls/data/tst_swipeview.qml
+++ b/tests/auto/controls/data/tst_swipeview.qml
@@ -41,7 +41,6 @@
import QtQuick 2.2
import QtTest 1.0
import Qt.labs.controls 1.0
-import Qt.labs.templates 1.0 as T
TestCase {
id: testCase
@@ -405,9 +404,9 @@ TestCase {
id: pageAttached
Text {
- property int index: T.SwipeView.index
- property SwipeView view: T.SwipeView.view
- property bool isCurrentItem: T.SwipeView.isCurrentItem
+ property int index: SwipeView.index
+ property SwipeView view: SwipeView.view
+ property bool isCurrentItem: SwipeView.isCurrentItem
}
}
@@ -426,13 +425,13 @@ TestCase {
compare(control.count, titles.length)
for (i = 0; i < control.count; ++i) {
compare(control.itemAt(i).text, titles[i])
- compare(control.itemAt(i).T.SwipeView.index, i)
- compare(control.itemAt(i).T.SwipeView.isCurrentItem, i === 0)
+ compare(control.itemAt(i).SwipeView.index, i)
+ compare(control.itemAt(i).SwipeView.isCurrentItem, i === 0)
}
control.currentIndex = data.currentBefore
for (i = 0; i < control.count; ++i) {
- compare(control.itemAt(i).T.SwipeView.isCurrentItem, i === data.currentBefore)
+ compare(control.itemAt(i).SwipeView.isCurrentItem, i === data.currentBefore)
}
control.moveItem(data.from, data.to)
@@ -447,8 +446,8 @@ TestCase {
compare(control.count, titles.length)
for (i = 0; i < control.count; ++i) {
compare(control.itemAt(i).text, titles[i])
- compare(control.itemAt(i).T.SwipeView.index, i);
- compare(control.itemAt(i).T.SwipeView.isCurrentItem, i === data.currentAfter)
+ compare(control.itemAt(i).SwipeView.index, i);
+ compare(control.itemAt(i).SwipeView.isCurrentItem, i === data.currentAfter)
}
control.destroy()
diff --git a/tests/auto/controls/data/tst_tumbler.qml b/tests/auto/controls/data/tst_tumbler.qml
index cd778b74..609298e8 100644
--- a/tests/auto/controls/data/tst_tumbler.qml
+++ b/tests/auto/controls/data/tst_tumbler.qml
@@ -41,7 +41,6 @@
import QtQuick 2.2
import QtTest 1.0
import Qt.labs.controls 1.0
-import Qt.labs.templates 1.0 as T
TestCase {
id: testCase
@@ -287,7 +286,7 @@ TestCase {
property Component displacementDelegate: Text {
objectName: "delegate" + index
text: modelData
- opacity: 0.2 + Math.max(0, 1 - Math.abs(T.Tumbler.displacement)) * 0.8
+ opacity: 0.2 + Math.max(0, 1 - Math.abs(Tumbler.displacement)) * 0.8
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
@@ -296,7 +295,7 @@ TestCase {
anchors.right: parent.right
}
- property real displacement: T.Tumbler.displacement
+ property real displacement: Tumbler.displacement
}
function test_displacement(data) {
@@ -532,16 +531,16 @@ TestCase {
}
property Component wrongDelegateTypeComponent: QtObject {
- property real displacement: T.Tumbler.displacement
+ property real displacement: Tumbler.displacement
}
property Component noParentDelegateComponent: Item {
- property real displacement: T.Tumbler.displacement
+ property real displacement: Tumbler.displacement
}
property Component gridViewComponent: GridView {}
property Component simpleDisplacementDelegate: Text {
- property real displacement: T.Tumbler.displacement
+ property real displacement: Tumbler.displacement
property int index: -1
}