diff options
author | Jarkko Koivikko <jarkko.koivikko@code-q.fi> | 2021-06-08 11:45:48 +0300 |
---|---|---|
committer | Jarkko Koivikko <jarkko.koivikko@code-q.fi> | 2021-06-08 14:49:57 +0300 |
commit | fbc2b7a103ea38df807c6032398cf82020394666 (patch) | |
tree | de4f459968e9d78b5586fe839bc8ae706315b77b /src | |
parent | 88584ea622a29a85c6376445772033bbc6579d7d (diff) |
Fix QML TypeError Cannot read property 'selectionListHeight' of null
These errors started to appear with the latest qtdeclarative:
qrc:/QtQuick/VirtualKeyboard/content/components/AlternativeKeys.qml:63:9: TypeError: Cannot read property 'alternateKeysListBottomMargin' of null
qrc:/QtQuick/VirtualKeyboard/content/components/AlternativeKeys.qml:61:9: TypeError: Cannot read property 'alternateKeysListItemHeight' of null
qrc:/QtQuick/VirtualKeyboard/content/components/Keyboard.qml:729:9: TypeError: Cannot read property 'selectionListHeight' of null
qrc:/QtQuick/VirtualKeyboard/content/components/Keyboard.qml:864:13: TypeError: Cannot read property 'keyboardDesignHeight' of null
Fix by adding conditional binding.
Change-Id: I00f3d410d3984e3a33ce25ebdb149dfa3a7cd964
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/virtualkeyboard/content/components/AlternativeKeys.qml | 4 | ||||
-rw-r--r-- | src/virtualkeyboard/content/components/Keyboard.qml | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/virtualkeyboard/content/components/AlternativeKeys.qml b/src/virtualkeyboard/content/components/AlternativeKeys.qml index 9cb5b0e0..951b3c8d 100644 --- a/src/virtualkeyboard/content/components/AlternativeKeys.qml +++ b/src/virtualkeyboard/content/components/AlternativeKeys.qml @@ -58,9 +58,9 @@ Item { highlightResizeDuration: 0 keyNavigationWraps: true orientation: ListView.Horizontal - height: keyboard.style.alternateKeysListItemHeight + height: keyboard.style ? keyboard.style.alternateKeysListItemHeight : 0 x: origin.x - y: origin.y - height - keyboard.style.alternateKeysListBottomMargin + y: keyboard.style ? origin.y - height - keyboard.style.alternateKeysListBottomMargin : 0 Component { id: defaultHighlight Item {} diff --git a/src/virtualkeyboard/content/components/Keyboard.qml b/src/virtualkeyboard/content/components/Keyboard.qml index a6ee2866..9f0c2be3 100644 --- a/src/virtualkeyboard/content/components/Keyboard.qml +++ b/src/virtualkeyboard/content/components/Keyboard.qml @@ -726,7 +726,7 @@ Item { (keyboard.active || shadowInputControl.visible) readonly property real visibleYOffset: VirtualKeyboardSettings.wordCandidateList.alwaysVisible ? 0 : -height readonly property real currentYOffset: visibleCondition || wordCandidateViewTransition.running ? visibleYOffset : 0 - height: Math.round(style.selectionListHeight) + height: style ? style.selectionListHeight : 0 anchors.left: parent.left anchors.right: parent.right spacing: 0 @@ -861,7 +861,7 @@ Item { id: keyboardInnerContainer z: 1 width: Math.round(keyboardBackground.width) - height: Math.round(style.keyboardDesignHeight * width / style.keyboardDesignWidth) + height: style ? Math.round(style.keyboardDesignHeight * width / style.keyboardDesignWidth) : 0 anchors.horizontalCenter: parent.horizontalCenter LayoutMirroring.enabled: false LayoutMirroring.childrenInherit: true |