From c00a33609557d1c7887cf27c8bef774b551057a7 Mon Sep 17 00:00:00 2001 From: Jarkko Koivikko Date: Tue, 8 Aug 2017 21:31:57 +0300 Subject: 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 --- src/virtualkeyboard/content/components/SelectionControl.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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 -- cgit v1.2.3