aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls/data/tst_button.qml
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2017-04-04 12:06:56 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2017-04-08 08:44:11 +0000
commit82e580bb91ebdde590d4f9beec242352918ce617 (patch)
treef1dd3333871e0e0ef5cf6e7e4ce44a02e4e655e3 /tests/auto/controls/data/tst_button.qml
parentf3892b35a1560412f7368d540182eb83bfacc9cd (diff)
QQuickIconLabel: rename text property to label
In preparation for the next patch which adds a "QString text" property to the API. Change-Id: Ie904108353c37a02cbc992c067f3e09aed9c2497 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'tests/auto/controls/data/tst_button.qml')
-rw-r--r--tests/auto/controls/data/tst_button.qml26
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/auto/controls/data/tst_button.qml b/tests/auto/controls/data/tst_button.qml
index d0f8bbf3..c25df3c2 100644
--- a/tests/auto/controls/data/tst_button.qml
+++ b/tests/auto/controls/data/tst_button.qml
@@ -437,16 +437,16 @@ TestCase {
verify(control)
verify(control.contentItem.implicitWidth + control.leftPadding + control.rightPadding > control.background.implicitWidth)
- // The implicitWidth of the ImplicitRow that all buttons use as their contentItem
+ // The implicitWidth of the IconLabel that all buttons use as their contentItem
// should be equal to the implicitWidth of the Text while no icon is set.
- compare(control.contentItem.implicitWidth, control.contentItem.text.implicitWidth)
+ compare(control.contentItem.implicitWidth, control.contentItem.label.implicitWidth)
// That means that spacing shouldn't affect it.
control.spacing += 100
- compare(control.contentItem.implicitWidth, control.contentItem.text.implicitWidth)
+ compare(control.contentItem.implicitWidth, control.contentItem.label.implicitWidth)
// The implicitWidth of the Button itself should, therefore, also never include spacing while no icon is set.
- compare(control.implicitWidth, control.contentItem.text.implicitWidth + control.leftPadding + control.rightPadding)
+ compare(control.implicitWidth, control.contentItem.label.implicitWidth + control.leftPadding + control.rightPadding)
}
function test_display_data() {
@@ -473,28 +473,28 @@ TestCase {
var iconImage = control.contentItem.icon
verify(iconImage)
verify(iconImage.hasOwnProperty("name"))
- var text = control.contentItem.text
- verify(text)
- verify(text.hasOwnProperty("text"))
+ var label = control.contentItem.label
+ verify(label)
+ verify(label.hasOwnProperty("text"))
switch (control.display) {
case Button.IconOnly:
compare(iconImage.visible, true)
- compare(text.visible, false)
+ compare(label.visible, false)
compare(iconImage.x, (control.availableWidth - iconImage.width) / 2)
break;
case Button.TextOnly:
compare(iconImage.visible, false)
- compare(text.visible, true)
- compare(text.x, (control.availableWidth - text.width) / 2)
+ compare(label.visible, true)
+ compare(label.x, (control.availableWidth - label.width) / 2)
break;
case Button.TextBesideIcon:
compare(iconImage.visible, true)
- compare(text.visible, true)
+ compare(label.visible, true)
if (control.mirrored)
- verify(text.x < iconImage.x)
+ verify(label.x < iconImage.x)
else
- verify(iconImage.x < text.x)
+ verify(iconImage.x < label.x)
break;
}
}