summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2014-06-30 15:12:32 +0200
committerJ-P Nurmi <jpnurmi@digia.com>2014-07-02 13:24:50 +0200
commitc185d6cd67653b34f04a7999a84634de1f1063b0 (patch)
tree28faeb2e970f4e96571391bf7d759e284d8c6139
parentdf295d70421f068a567d0e37784bf7a1def56073 (diff)
downloadqtquickcontrols-c185d6cd67653b34f04a7999a84634de1f1063b0.tar.gz
TextField/Area: soft dependency to inputMethodHints
Don't use an alias to a property that might not exist (when QT_NO_IM), but just bind to it and fallback to Qt.ImhNone if it's undefined. Change-Id: I0e8de86acb534dfe620b829c2bff09db119ef08d Reviewed-by: Liang Qi <liang.qi@digia.com>
-rw-r--r--src/controls/TextArea.qml2
-rw-r--r--src/controls/TextField.qml2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/controls/TextArea.qml b/src/controls/TextArea.qml
index 74ed716e..83d42aaf 100644
--- a/src/controls/TextArea.qml
+++ b/src/controls/TextArea.qml
@@ -235,7 +235,7 @@ ScrollView {
\li Qt.ImhExclusiveInputMask - This mask yields nonzero if any of the exclusive flags are used.
\endlist
*/
- property alias inputMethodHints: edit.inputMethodHints
+ property int inputMethodHints: edit.inputMethodHints || Qt.ImhNone
/*!
\qmlproperty int TextArea::length
diff --git a/src/controls/TextField.qml b/src/controls/TextField.qml
index 58498f13..89e23ed2 100644
--- a/src/controls/TextField.qml
+++ b/src/controls/TextField.qml
@@ -281,7 +281,7 @@ Control {
\li Qt.ImhExclusiveInputMask - This mask yields nonzero if any of the exclusive flags are used.
\endlist
*/
- property alias inputMethodHints: textInput.inputMethodHints
+ property int inputMethodHints: textInput.inputMethodHints || Qt.ImhNone
/*!
\qmlproperty int TextField::length