diff options
author | Sebastian Sauer <sebastian.sauer.ford@kdab.com> | 2014-08-12 18:52:50 +0700 |
---|---|---|
committer | Sebastian Sauer <sebastian.sauer@kdab.com> | 2014-08-22 20:46:08 +0200 |
commit | 595340f1622783e97c53b035b78691572537f00a (patch) | |
tree | b3c5d037fd6feaeb5cc63bf6c24545a83c861e4b /tests/auto/qml/qqmllanguage/data | |
parent | 29efdf1981a60a796e611f3bc8763afdcb6c2497 (diff) |
v4: Enable primitive conversation to QQmlScriptString in javascript
This makes following QML-code proper working:
ParentChange {
x: 0
Component.onCompleted: x = 10
}
where x is a QQmlScriptString.
Before this patch an error-message would be thrown that the
bool/int/string/etc cannot be converted to a QQmlScriptString.
With the patch primitive types including null and undefined are
proper converted to a QQmlScriptString. The patch ignores (as
in not implements) function/binding assignment.
Unfortunately since commit aa25ad8d5f4 its not possible any
longer to instanciate QQmlScriptString what means there is
otherwise no (easy) way to inject a QQmlScriptString from
within Javascript.
Change-Id: I18aac6a6e9a57f3b7d0a2d66cdab2be6c3c153c5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'tests/auto/qml/qqmllanguage/data')
-rw-r--r-- | tests/auto/qml/qqmllanguage/data/scriptStringJs.qml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllanguage/data/scriptStringJs.qml b/tests/auto/qml/qqmllanguage/data/scriptStringJs.qml new file mode 100644 index 0000000000..bf6a8b9fbd --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/scriptStringJs.qml @@ -0,0 +1,5 @@ +import Test 1.0 + +MyTypeObject { + scriptProperty: " hello \" world " +} |