Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
6.0
-
b1afde8ada7959b29acb4ac0fae87d7a8ae8aa08 febb6ba891616b71476b736d4c583054685c7766
Description
I tried to move from a1c91787264f6f535b5cf094b57ee53058856df4 (Fri Jun 19) to current dev (3ff1cbd6c071b53ed69bb310434070965246144a) and got major problem.
With a1c91787264f6f535b5cf094b57ee53058856df4 such code doesn't produce any warnings:
import QtQuick 2.15
Rectangle {
anchors {
horizontalCenter: parent.horizontalCenter
verticalCenter: parent.verticalCenter
}
}
now it reports: "Warning: anchors was not found. Did you add all import paths?"
if change code to (2):
Rectangle { anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter }
And after that qmllint remembered that "anchors" normal thing for item,
but "parent" also not good, it starts reporting for (2):
Warning: Property "horizontalCenter" not found on type "program" at /tmp/Test.qml:5:38
anchors.horizontalCenter: parent.horizontalCenter
^^^^^^^^^^^^^^^^
Warning: Property "verticalCenter" not found on type "program" at /tmp/Test.qml:6:36
anchors.verticalCenter: parent.verticalCenter
^^^^^^^^^^^^^^
and only such code have no errors with recent qmllint:
Rectangle { anchors.horizontalCenter: parent anchors.verticalCenter: parent }