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

qmllint: Member "destroy" not found on type "Popup"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 6.7.1, 6.7, 6.8.0 FF
    • 6.8
    • QML: Tooling
    • None
    • 8799d55d7 (dev), 976978aa7 (6.7)

    Description

      For code below qmllint from Qt 6.6 reports nothing,
      while qmllint built from git (33ba52c888d3f4d05e588dafe79c164e1059e295) reports such warning:

      Warning: Test.qml:18:17: Member "destroy" not found on type "Popup" [missing-property]
                  dlg.destroy();
                      ^^^^^^^
      Info: Did you mean "destroyed"?
                  dlg.destroyed();
                      ^^^^^^^^^
      
      

      Despite of warning code works just fine if you run it with "qml" tool from Qt 6.6 and Qt (git).

      import QtQuick
      import QtQuick.Controls
      
      Item {
          Component.onCompleted: {
              console.log("working");
          }
      
          Button {
              text: "press me"
              onClicked: {
                  console.log("on button click");
                  const dlg = popupC.createObject(Window.window, {
                      "x": 100,
                      "y": 100
                  }) as Popup;
                  dlg.open();
                  dlg.destroy();
              }
          }
      
          Component {
              id: popupC
      
              Popup {
                  Text {
                      width: 200
                      height: 200
                      text: "Some text"
                  }
      
              }
      
          }
      
      }
      

      Attachments

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

        Activity

          People

            ulherman Ulf Hermann
            evgeniy_dushistov evgeniy_dushistov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes