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

Assigning list<string> to list<var> silently fails

    XMLWordPrintable

Details

    • All

    Description

      Assigning list<string> to list<var> silently fails, and turns said list<var> into an empty array.

      In practice, this rules our using a list<> type for a property that reads from a model which (depending on a platform) may return list of strings or list of integers (typical situation with X11 vs. Wayland identifiers, for example); and I have to resort to this:

      property /*list<var>*/ var virtualDesktops: model.VirtualDesktops
      

      Expected behavior

      Automatically convert the list<string> value, or list of any other primitive or object type for that matter.

      Actual behavior

      Silent(!) fail resulting in an empty list instead of a properly populated target.

      Attachments

        Issue Links

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

          Activity

            People

              qtqmlteam Qt Qml Team User
              ratijas ivan tkachenko
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes