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

Object.keys(any "delegate" property) returns the key "loadUrl" twice

    XMLWordPrintable

Details

    • Linux/X11
    • 92fa6adcc5b85f8601a5648d4f8879f3a0c6675f (qt/qtdeclarative/dev)

    Description

      Object.keys(any "delegate" property) returns the key "loadUrl" twice.

      It seems anomalous that two keys (method names) are named identically; conceptually impossible, actually.

      AFAIK there is no related functional mis-behavior, but I'm reporting this in case it indicates some kind of oversight, duplication, etc. in the C++ code.

      The output from

      import QtQuick 2.12
      import QtQuick.Window 2.12
      
      Window {
          visible: true
      
          Component {
              id: component
              Text {
                  text: "foo"
              }
          }
          
          Component.onCompleted: {
              print("keys(component) =", Object.keys(component))
              // [objectName,progress,status,url,objectNameChanged,statusChanged,progressChanged,loadUrl,loadUrl,setData,errorString,createObject,incubateObject]
          }
      }
      

      Shows the key "loadUrl" twice.

      Attachments

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

        Activity

          People

            erikv Erik Verbruggen
            jimav Jim Avera
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes