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

[REG 5.13 -> 5.14] Assigning to QSet<QByteArray> property no longer works (due to conversion to js list while reading)

    XMLWordPrintable

    Details

    • Platform/s:
      Linux/Wayland
    • Commits:
      6db55e3451e8ba244e9f2555713d44d988977871, 2b8042182d77241ffe7e6b4edf4e727315f93147

      Description

      I have an object that exposes a QSet<QByteArray> from C++ via Q_PROPERTY, and that assigns it to another object with a property of the same type.

      This used to work as QML handled the value as QVariant(QSet<QByteArray>).

      In qt 5.14 this no longer works with an error of "Unable to assign QJSValue to QSet<QByteArray>" as container classes are now implicitly converted to javascript lists, but then not back. The only way I got it to function again is by converting the property I write to to a QList<QString> (QByteArray doesn't work).

      If all containers are implicitly converted to lists I think the conversion back should be supported as well.

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              fabiankosmale Fabian Kosmale
              Reporter:
              chrigi_1 Christian Mollekopf
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes