diff options
author | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-06-30 14:30:59 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-06-30 20:54:19 +0000 |
commit | 1cb1048d7b0d24ea8cbc9ddde965a8eb00feef09 (patch) | |
tree | 983728d4fca72e8757435c9a610b9e689cc41d70 /tests/auto/controls | |
parent | 5e226b8426a3366515dfdf791ea75e063f029afb (diff) |
Refactor ExclusiveGroup
Add support for toggled() and toggled(bool) signals to bring
ExclusiveGroup 2.0 on par with ExclusiveGroup 1.0. Furthermore,
the attached property is now "ExclusiveGroup.group" to be consistent
with all other attached properties like StackView.view, TabView.view,
and others. It looks clumsy to repeat, but it's better to keep the
type names to the minimum, and the documentation also stays in one
place.
Change-Id: Ic46f8d2ec4b58c5056e8b2bbca5c9f88968bfb80
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'tests/auto/controls')
-rw-r--r-- | tests/auto/controls/data/tst_exclusivegroup.qml | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/auto/controls/data/tst_exclusivegroup.qml b/tests/auto/controls/data/tst_exclusivegroup.qml index ba840d26..537121d0 100644 --- a/tests/auto/controls/data/tst_exclusivegroup.qml +++ b/tests/auto/controls/data/tst_exclusivegroup.qml @@ -95,7 +95,7 @@ TestCase { var checkable1 = checkable.createObject(testCase, {checked: true}) var checkable2 = checkable.createObject(testCase, {checked: false}) - var checkable3 = checkable.createObject(testCase, {checked: true}) + var checkable3 = checkable.createObject(testCase, {checked: true, objectName: "3"}) // add checked group.addCheckable(checkable1) @@ -160,9 +160,9 @@ TestCase { id: checkBoxes Item { property ExclusiveGroup group: ExclusiveGroup { id: group } - property CheckBox control1: CheckBox { Exclusive.group: group } - property CheckBox control2: CheckBox { Exclusive.group: group } - property CheckBox control3: CheckBox { Exclusive.group: group } + property CheckBox control1: CheckBox { ExclusiveGroup.group: group } + property CheckBox control2: CheckBox { ExclusiveGroup.group: group } + property CheckBox control3: CheckBox { ExclusiveGroup.group: group } } } @@ -170,9 +170,9 @@ TestCase { id: radioButtons Item { property ExclusiveGroup group: ExclusiveGroup { id: group } - property RadioButton control1: RadioButton { Exclusive.group: group } - property RadioButton control2: RadioButton { Exclusive.group: group } - property RadioButton control3: RadioButton { Exclusive.group: group } + property RadioButton control1: RadioButton { ExclusiveGroup.group: group } + property RadioButton control2: RadioButton { ExclusiveGroup.group: group } + property RadioButton control3: RadioButton { ExclusiveGroup.group: group } } } @@ -180,9 +180,9 @@ TestCase { id: switches Item { property ExclusiveGroup group: ExclusiveGroup { id: group } - property Switch control1: Switch { Exclusive.group: group } - property Switch control2: Switch { Exclusive.group: group } - property Switch control3: Switch { Exclusive.group: group } + property Switch control1: Switch { ExclusiveGroup.group: group } + property Switch control2: Switch { ExclusiveGroup.group: group } + property Switch control3: Switch { ExclusiveGroup.group: group } } } @@ -190,9 +190,9 @@ TestCase { id: toggleButtons Item { property ExclusiveGroup group: ExclusiveGroup { id: group } - property ToggleButton control1: ToggleButton { Exclusive.group: group } - property ToggleButton control2: ToggleButton { Exclusive.group: group } - property ToggleButton control3: ToggleButton { Exclusive.group: group } + property ToggleButton control1: ToggleButton { ExclusiveGroup.group: group } + property ToggleButton control2: ToggleButton { ExclusiveGroup.group: group } + property ToggleButton control3: ToggleButton { ExclusiveGroup.group: group } } } |