Commit 595340f1 authored by Sebastian Sauer's avatar Sebastian Sauer Committed by Sebastian Sauer
Browse files

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 aa25ad8d

 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: default avatarSimon Hausmann <simon.hausmann@digia.com>
parent 29efdf19
Branches
Tags
No related merge requests found
Showing with 104 additions and 2 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment