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

qmlsc complains about shadowing on the wrong type

    XMLWordPrintable

Details

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

    Description

      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.

      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
              srutledg Shawn Rutledge
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes