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

qmlsc complains about shadowing on the wrong type

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.5.1
    • QML: Compiler
    • None

      import QtQuick
      
      Window {
          id: root
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")
      
          readonly property bool active: root.dragHandler.active
          property DragHandler dragHandler: DragHandler {}
      }
      

      compiles with

      Warning: main.qml:10:53: Could not compile binding for active: Member active of QQuickDragHandler of (component in /home/prcs1076/tmp/untitled/build/main.qml)::dragHandler 
      with type QQuickDragHandler can be shadowed [compiler]
      
          readonly property bool active: root.dragHandler.active
      

      The active property that is shadowed would be Window.active, not DragHandler.active.

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

            qtqmlteam Qt Qml Team User
            srutledg Shawn Rutledge
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes