Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.2.0 Alpha
-
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); } }