aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/accessibility
diff options
context:
space:
mode:
authorJan Arve Saether <jan-arve.saether@digia.com>2014-10-15 13:58:34 +0200
committerJan Arve Sæther <jan-arve.saether@theqtcompany.com>2014-10-27 14:53:16 +0100
commit8f6436f125faae91eb472ddddbbae06dba5da671 (patch)
treecd99bd534e9e01ebddda584eb24a8bae3b195895 /tests/manual/accessibility
parent32af8055985c1f978574eec62512638f472e8290 (diff)
Move action handlers to the Accessible attached object
With this change, instead of writing: function accessiblePressAction() { submit() } You should write: Accessible.onPressAction: { submit() } For the moment, only 4 actions are added: press, toggle, increase and decrease. The old style action handlers are deprecated, and removed from the documentation. New style action handlers will be preferred in case an item declares both styles. Change-Id: I11919e631d8476d55540f94252757b911c44ade4 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Diffstat (limited to 'tests/manual/accessibility')
-rw-r--r--tests/manual/accessibility/textandbuttons.qml5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/manual/accessibility/textandbuttons.qml b/tests/manual/accessibility/textandbuttons.qml
index 48ce6e26e9..74c3bf3897 100644
--- a/tests/manual/accessibility/textandbuttons.qml
+++ b/tests/manual/accessibility/textandbuttons.qml
@@ -50,9 +50,8 @@ Rectangle {
Accessible.role : Accessible.Button
- function accessibleAction(action) {
- if (action == Qt.Press)
- buttonAction()
+ Accessible.onPressAction: {
+ buttonAction()
}
function buttonAction() {