Skip to content
  • Simon Hausmann's avatar
    Fix mapping of JS objects/arrays to C++ · 3dbe05f6
    Simon Hausmann authored
    
    
    [ChangeLog][QtQml][Important Behavior Changes] When a JavaScript object/array
    is passed to C++ through a QVariant, the engine no longer immediately converts
    the object recursively into a QVariantMap or QVariantList but instead stores
    a QJSValue in the QVariant. This prevents a loss of data when the JS object
    contains non-primitive types such as function objects for example. Code that
    expects the variant type to be exactly QVariant::Map or QVariant::List may
    need to be adapted. Registered conversion functions however ensure that code
    that merely calls toMap() or toList() continues to work.
    
    Task-number: QTBUG-40431
    Change-Id: I1dbc1d5f8e78ad28bb62db3681b9a0b34557e7f5
    Reviewed-by: default avatarLars Knoll <lars.knoll@digia.com>
    3dbe05f6