Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.6.0 Beta3
-
None
-
42daf5874 (dev), 0a8390881 (6.6), e6ec87d35 (6.5)
Description
Does qmllint handle the "print" identifier somehow special?
import QtQuick import QtQuick.Window import untitled5 Window { width: 640 height: 480 visible: true title: qsTr("Hello World") Foo { id: foo } Component.onCompleted: { foo.print(); // <<< qmllint "Member print not found" foo.bar(); // <<< this is ok } }
#ifndef FOO_H #define FOO_H #include <QObject> #include <QQmlEngine> class Foo : public QObject { Q_OBJECT QML_ELEMENT public: explicit Foo(QObject *parent = nullptr); Q_INVOKABLE void print() {} // <<< qmllint complains Q_INVOKABLE void bar() {} }; #endif // FOO_H
Warning: .../untitled5/Main.qml:17:13: Member "print" not found on type "Foo" [missing-property] foo.print(); ^^^^^ Info: Did you mean "print"? foo.print(); ^^^^^
Attachments
For Gerrit Dashboard: QTBUG-117077 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
507689,4 | TypeResolver: Change the way member types of scopes are searched for | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
508099,3 | TypeResolver: Change the way member types of scopes are searched for | 6.6 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
508448,3 | TypeResolver: Change the way member types of scopes are searched for | 6.5 | qt/qtdeclarative | Status: MERGED | +2 | 0 |