aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJarkko Koivikko <jarkko.koivikko@code-q.fi>2017-08-08 21:31:57 +0300
committerJarkko Koivikko <jarkko.koivikko@code-q.fi>2017-08-09 09:27:04 +0000
commitc00a33609557d1c7887cf27c8bef774b551057a7 (patch)
treefcd239fbbc70826e978380fb6a3e0d28cbbc02ab /src
parentecef7261a835966d8d202fd5e720203c4bdd5b4d (diff)
Fix warning seen in layoutresources and layoutfilesystem tests
QWARN : tst_layoutresources::layouts() qrc:///QtQuick/VirtualKeyboard/content/components/SelectionControl.qml:80: TypeError: Cannot read property 'cursorRectIntersectsClipRect' of null QWARN : tst_layoutresources::layouts() qrc:///QtQuick/VirtualKeyboard/content/components/SelectionControl.qml:48: TypeError: Cannot read property 'anchorRectIntersectsClipRect' of null Change-Id: I8478487c51462a37d3fa5396eac5b6ab4bec3a17 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/virtualkeyboard/content/components/SelectionControl.qml4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/virtualkeyboard/content/components/SelectionControl.qml b/src/virtualkeyboard/content/components/SelectionControl.qml
index 125a8eb7..16961c23 100644
--- a/src/virtualkeyboard/content/components/SelectionControl.qml
+++ b/src/virtualkeyboard/content/components/SelectionControl.qml
@@ -45,7 +45,7 @@ Item {
Behavior on opacity {
NumberAnimation { duration: 200 }
}
- opacity: inputContext.anchorRectIntersectsClipRect ? 1.0 : 0.0
+ opacity: inputContext !== null && inputContext.anchorRectIntersectsClipRect ? 1.0 : 0.0
MouseArea {
width: parent.width * 2
@@ -77,7 +77,7 @@ Item {
Behavior on opacity {
NumberAnimation { duration: 200 }
}
- opacity: inputContext.cursorRectIntersectsClipRect ? 1.0 : 0.0
+ opacity: inputContext !== null && inputContext.cursorRectIntersectsClipRect ? 1.0 : 0.0
MouseArea {
width: parent.width * 2