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

Most properties in QtQuick are not FINAL and can be shadowed

    XMLWordPrintable

Details

    Description

      Accessing a DragHandler via property like

      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
      

       

      In contrast to QTBUG-108599 the assigned type is defined. Maybe because it's active property is not FINAL.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-108739
          # Subject Branch Project Status CR V

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              cajus Cajus Pollmeier
              Votes:
              2 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: