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

QML JavaScript Array.sort() is unreliable

    XMLWordPrintable

Details

    • 210475565969ca

    Description

      Run the attached example code couple of times.

      Most Array.sort() calls are ok, but for some sort() returns an array of undefined items:

      console.log(array) // array= [[object Object],[object Object],[object Object],...]
      array.sort(function() { return 0.5 - Math.random() })
      console.log(array) // array= [,,,,]
      

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            jpetrell Joona Petrell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes