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

Detect illegally-shadowed properties at compile time

    XMLWordPrintable

Details

    Description

      The code below produces a runtime error ("Cannot override FINAL property"). It would be nice to have an error/warning from qmlsc/qmllint too.

       

      import QtQuick
      
      Window {
          width: 800
          height: 600
          visible: true
      
          Rectangle {
              width: 100
              height: 100
              color: "green"
      
              // Oops, we tried to shadow a FINAL property from QQuickRectangle:
              // Q_PROPERTY(qreal topLeftRadius READ topLeftRadius WRITE setTopLeftRadius NOTIFY topLeftRadiusChanged RESET resetTopLeftRadius REVISION(6, 7) FINAL)
              property real topLeftRadius: 50 
          }
      }
      

      Attachments

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

        Activity

          People

            qtqmlteam Qt Qml Team User
            skoh-qt Sze Howe Koh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes