diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2019-12-04 12:15:27 +0100 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2019-12-05 17:34:28 +0100 |
commit | 459ec87b0abdd476d415946ed07c8490c10b97f0 (patch) | |
tree | 6cdc01bdbf168c691d56b6c816406d0d5d414662 /src/virtualkeyboard/content/components/WordCandidatePopupList.qml | |
parent | e34d4ed13c7778a403e4d7c08b84e220deb119af (diff) |
Fix warnings about Binding's new restoreMode propertyv5.14.0-rc2v5.14.0
The warning is:
QML Binding: Not restoring previous value because restoreMode has not been set.
This behavior is deprecated. In Qt < 6.0 the default is Binding.RestoreBinding.
In Qt >= 6.0 the default is Binding.RestoreBindingOrValue.
Fixes: QTBUG-80523
Change-Id: I18721419c2822aa80373d16f7e142e42bafe317c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/virtualkeyboard/content/components/WordCandidatePopupList.qml')
-rw-r--r-- | src/virtualkeyboard/content/components/WordCandidatePopupList.qml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/virtualkeyboard/content/components/WordCandidatePopupList.qml b/src/virtualkeyboard/content/components/WordCandidatePopupList.qml index e255142a..5790bc74 100644 --- a/src/virtualkeyboard/content/components/WordCandidatePopupList.qml +++ b/src/virtualkeyboard/content/components/WordCandidatePopupList.qml @@ -28,6 +28,8 @@ ****************************************************************************/ import QtQuick 2.0 +// Deliberately imported after QtQuick to avoid missing restoreMode property in Binding. Fix in Qt 6. +import QtQml 2.14 import QtQuick.VirtualKeyboard 2.3 PopupList { @@ -55,12 +57,14 @@ PopupList { (wordCandidatePopupList.currentItem.hasOwnProperty("cursorAnchor") ? wordCandidatePopupList.currentItem.cursorAnchor : wordCandidatePopupList.currentItem.width) : 0)) when: wordCandidatePopupList.visible + restoreMode: Binding.RestoreBinding } Binding { target: wordCandidatePopupList property: "y" value: Math.round(wordCandidatePopupList.flipVertical ? Qt.inputMethod.cursorRectangle.y - wordCandidatePopupList.height : Qt.inputMethod.cursorRectangle.y + Qt.inputMethod.cursorRectangle.height) when: wordCandidatePopupList.visible + restoreMode: Binding.RestoreBinding } model: enabled ? InputContext.inputEngine.wordCandidateListModel : null |