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

qmllint plus mysterious window

    XMLWordPrintable

Details

    • 68982dbd0ad9cb0542f69ca4ee4ebbca8baee2cc (qt/qtdeclarative/dev)

    Description

      I built qmllint from dev branch(facffe8e5715a7ef0a07d4b950f9433fc92d8882).

      For code bellow it sometimes print warning and sometimes not.

      $ for i in `seq 1 10`; do ./qtbase/bin/qmllint /var/tmp/Test21.qml; done
      Warning: /var/tmp/Test21.qml:5:22: Property "window" not found on type "QQuickWindow"
                      const win = Window.window;
                                      ^^^^^^
      Warning: /var/tmp/Test21.qml:5:22: Property "window" not found on type "QQuickWindow"
                      const win = Window.window;
                                      ^^^^^^
      Warning: /var/tmp/Test21.qml:5:22: Property "window" not found on type "QQuickWindow"
                      const win = Window.window;
                                      ^^^^^^
      Warning: /var/tmp/Test21.qml:5:22: Property "window" not found on type "QQuickWindow"
                      const win = Window.window;
                                      ^^^^^^
      Warning: /var/tmp/Test21.qml:5:22: Property "window" not found on type "QQuickWindow"
                      const win = Window.window;
                                      ^^^^^^
      Warning: /var/tmp/Test21.qml:5:22: Property "window" not found on type "QQuickWindow"
                      const win = Window.window;
                                      ^^^^^^
      

      As can you see it prints 6 out of 10 times warning, while it should not print it at all.

      Code:

      import QtQuick 2.15
      
      Item {
              Component.onCompleted: {
                      const win = Window.window;
                      console.log("my window", win);
              }
      }
      
      

      Attachments

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

        Activity

          People

            max.goldstein Maximilian Goldstein
            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