diff options
author | Mitch Curtis <mitch.curtis@digia.com> | 2013-02-21 16:45:47 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-02-22 15:55:29 +0100 |
commit | 0b4bac0599c226a590c414a1cbec4d91e3e49b12 (patch) | |
tree | 7c093e27df695e98f6c7e9bcaf1e3616f3e71084 /tests/auto/controls/data/tst_checkbox.qml | |
parent | fa32cd2fddc25952d14c0953e76f590874122494 (diff) | |
download | qtquickcontrols-0b4bac0599c226a590c414a1cbec4d91e3e49b12.tar.gz |
Warn when trying to use ExclusiveGroups with partiallyCheckedEnabled.
It makes no sense to have partially checked boxes as part of an
exclusive group, and exclusive group doesn't support it.
Change-Id: I9658c247345bfc8e165ba11502691d1b4813ad54
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'tests/auto/controls/data/tst_checkbox.qml')
-rw-r--r-- | tests/auto/controls/data/tst_checkbox.qml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_checkbox.qml b/tests/auto/controls/data/tst_checkbox.qml index 91d3935e..f0cbe4cb 100644 --- a/tests/auto/controls/data/tst_checkbox.qml +++ b/tests/auto/controls/data/tst_checkbox.qml @@ -198,6 +198,24 @@ Item { compare(signalSpy.count, 1); compare(root.checkBox1.checked, true); compare(root.checkBox2.checked, false); + + ignoreWarning("Cannot have partially checked boxes in an ExclusiveGroup."); + root.checkBox1.partiallyCheckedEnabled = true; + ignoreWarning("Cannot have partially checked boxes in an ExclusiveGroup."); + root.checkBox2.partiallyCheckedEnabled = true; + + // Shouldn't be any warnings, since we're not setting a group. + root.checkBox1.exclusiveGroup = null; + root.checkBox2.exclusiveGroup = null; + + ignoreWarning("Cannot have partially checked boxes in an ExclusiveGroup."); + root.checkBox1.exclusiveGroup = root.group; + ignoreWarning("Cannot have partially checked boxes in an ExclusiveGroup."); + root.checkBox2.exclusiveGroup = root.group; + + // Shouldn't be any warnings, since we're not setting partiallyCheckedEnabled to true. + root.checkBox1.partiallyCheckedEnabled = false; + root.checkBox2.partiallyCheckedEnabled = false; } } } |