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

qmllint:Warn about (potential) undefined assigment

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P3: Somewhat important
    • 6.9
    • None
    • QML: Tooling
    • None

    Description

      Assigning undefined to a non-resettable property should trigger a warning from qmllint/LSP. This should also hold for potentially undefined values created by optional chaining. Consider

      import QtQuick
      
      Item {
        property Item foo
        visible: undefined//foo?.visible
      }
      

      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
              fabiankosmale Fabian Kosmale
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes