Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.5
-
8e69558f2f (qt/qtdeclarative/dev) 2b8b69edc1 (qt/qtdeclarative/6.4) 2b8b69edc1 (qt/tqtc-qtdeclarative/6.4)
Description
When I ran qmllint against cod bellow, I got such warning:
main.qml:14:24: Type "uint" of property "foo" not found. This is likely due to a missing dependency entry or a type no t being exposed declaratively. win.a = myItem.foo + 1; ^^^
main.qml:
import QtQuick 2.15 import QtQuick.Window 2.15 import example.mylib Window { id: win width: 640 height: 480 visible: true title: qsTr("Hello World") property int a: 16 Component.onCompleted: { win.a = myItem.foo + 1; console.log("win.a =", win.a); } MyItem { id: myItem } }
Where MyItem type defined in C++ in such way:
#include <QQuickItem> class MyItem : public QQuickItem { Q_OBJECT QML_ELEMENT Q_PROPERTY(quint32 foo MEMBER foo_ NOTIFY fooChanged FINAL) signals: void fooChanged(); public: MyItem(); private: quint32 foo_ = 17; };
If I change "foo" type to "int" qmllint becomes happy,
but with quint32 qml runtime works without any problem.
May be builtins.qmltypes should have component for "uint" ?
Also I got warnings "type not found" for such types "qulonglong", "QVector<int>", "vector<qreal>", "QList<int>".
I use qtdeclarative (d52a2098b91d037ddcd5d9a75106e78689d8aba5).
For generation of qmltypes I use cmake::qt_add_qml_module.
Attachments
Issue Links
- split to
-
QTBUG-101634 Add builtin types for 8 and 16bit integers, as well as unsigned 32bit
- Closed