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

Property "hasOwnProperty" not found on type "Item"

    XMLWordPrintable

Details

    • 90790ef23bb148b4ac4c055bd3c11153b4c9a502 (qt/qtdeclarative/dev)

    Description

      "qmllint" (qtdeclarative/e9bdafcfad0f09d15b710a3bca5acae2604c14bc) reports:

      Warning: Test.qml:7:14: Property "hasOwnProperty" not found on type "Item"
                      if (myItem.hasOwnProperty('isChecked')) {
                              ^^^^^^^^^^^^^^
      

      for such code:

      import QtQuick 2.15
      
      Item {
              id: myItem
      
              Component.onCompleted: {
                      if (myItem.hasOwnProperty('isChecked')) {
                              console.log(true);
                      } else {
                              console.log(false);
                      }
              }
      }
      

      "qml" executes such code just fine.

      Attachments

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

        Activity

          People

            max.goldstein Maximilian Goldstein
            evgeniy_dushistov evgeniy_dushistov
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes