aboutsummaryrefslogtreecommitdiffstats
path: root/src/virtualkeyboard/content
diff options
context:
space:
mode:
authorJarkko Koivikko <jarkko.koivikko@code-q.fi>2015-10-27 12:15:47 +0200
committerJarkko Koivikko <jarkko.koivikko@code-q.fi>2015-10-27 12:13:41 +0000
commit3c8195bd4cd4ec5fc882ee40eab888568e048b8d (patch)
tree4a597987deed47a183b10e4efe55ec4e67073edd /src/virtualkeyboard/content
parentb27fa0974957346f2ec4bde55efbabec0c293bcf (diff)
Stabilize arrow key navigation tests
The arrow key navigation tests could fail due to bug in a test function. Previously the navigation key press and the highlight rectangle could go out of sync due to highlight animation. Now the test waits until the highlight animation is completed and then proceeds with the test, making the test cases more robust and not dependent of system performance. Change-Id: I72bc15de988a212fa2e96230bc346bbfd3fdea41 Reviewed-by: Rainer Keller <rainer.keller@theqtcompany.com>
Diffstat (limited to 'src/virtualkeyboard/content')
-rw-r--r--src/virtualkeyboard/content/components/Keyboard.qml12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/virtualkeyboard/content/components/Keyboard.qml b/src/virtualkeyboard/content/components/Keyboard.qml
index 213a7303..ea47ed44 100644
--- a/src/virtualkeyboard/content/components/Keyboard.qml
+++ b/src/virtualkeyboard/content/components/Keyboard.qml
@@ -451,6 +451,10 @@ Item {
property var highlightItemOffset: highlightItem ? keyboard.mapFromItem(highlightItem, highlightItem.x - highlightItem.x, highlightItem.y - highlightItem.y) : ({x:0, y:0})
property int moveDuration: 200
property int resizeDuration: 200
+ property alias xAnimation: xAnimation
+ property alias yAnimation: yAnimation
+ property alias widthAnimation: widthAnimation
+ property alias heightAnimation: heightAnimation
z: 2
x: highlightItemOffset.x
y: highlightItemOffset.y
@@ -459,16 +463,16 @@ Item {
visible: keyboard.navigationModeActive && highlightItem !== null && highlightItem !== keyboard
sourceComponent: keyboard.style.navigationHighlight
Behavior on x {
- NumberAnimation { duration: naviationHighlight.moveDuration; easing.type: Easing.OutCubic }
+ NumberAnimation { id: xAnimation; duration: naviationHighlight.moveDuration; easing.type: Easing.OutCubic }
}
Behavior on y {
- NumberAnimation { duration: naviationHighlight.moveDuration; easing.type: Easing.OutCubic }
+ NumberAnimation { id: yAnimation; duration: naviationHighlight.moveDuration; easing.type: Easing.OutCubic }
}
Behavior on width {
- NumberAnimation { duration: naviationHighlight.resizeDuration; easing.type: Easing.OutCubic }
+ NumberAnimation { id: widthAnimation; duration: naviationHighlight.resizeDuration; easing.type: Easing.OutCubic }
}
Behavior on height {
- NumberAnimation { duration: naviationHighlight.resizeDuration; easing.type: Easing.OutCubic }
+ NumberAnimation { id: heightAnimation; duration: naviationHighlight.resizeDuration; easing.type: Easing.OutCubic }
}
}