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

qmllint:Warn about (potential) undefined assigment

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • Some future release
    • None
    • QML: Tooling
    • None

      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
      }
      

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

            qtqmlteam Qt Qml Team User
            fabiankosmale Fabian Kosmale
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes