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

qmllint should warn about assigning to readonly property

    XMLWordPrintable

Details

    • 0984eb6ab0db4cebdf95f17b4f81fff6a810703f (qt/qtdeclarative/dev)

    Description

      For code bellow git dev (cf00dd59d16005d0511c43b3b7ca15e43612b9f6) qmllint reports no warnings. But activeFocus is readonly property, so any form of assign to it is mistake.

      import QtQuick 2.15
      
      Item {
              id: foo
              activeFocus: true
              Component.onCompleted: {
                      foo.activeFocus = true; 
              }
      }
      

      Attachments

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

        Activity

          People

            max.goldstein Maximilian Goldstein
            evgeniy_dushistov evgeniy_dushistov
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes