Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-37854

QQmlEngine/QJSEngine toScriptValue<QVariantMap> assumes strings for keys

    XMLWordPrintable

Details

    • bc030defad916b073ede55d7a7ad8db9a41e0ad2 (qtdeclarative)

    Description

      When converting a QVariantMap to a script value using Q[Qml,JS]Engine, the javascript engine assumes that all the keys are strings but still tries to convert the values. As a result if you use a QVariantMap with a number as a key (wrapped in quotes), the engine will convert the value to a js Number and segfault in QV4::InternalClass::addMember on the string lookup. Attached is a small example exhibiting the crash

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            shausman Simon Hausmann
            mbroadst Matt Broadstone
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes