Details
-
Suggestion
-
Resolution: Done
-
P3: Somewhat important
-
None
-
None
Description
JS might not have types, but QML does. It would be nice to have a Qt.instanceOf function so that you can check types. Note that this would operate on QML types, so Foo.qml (with contents Rectangle
{...}) would be of type Foo and Rectangle (since this is effectively QML inheritance for components).
Attachments
For Gerrit Dashboard: QTBUG-24799 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
182734,6 | jsruntime: Add a vtable hook on Object for instanceof | dev | qt/qtdeclarative | Status: MERGED | -2 | 0 |
182753,18 | qml: Override the new Object::instanceOf hook to allow QML type checking | dev | qt/qtdeclarative | Status: MERGED | -2 | 0 |
182873,16 | Enable resolution of composite types in QQmlTypeNameCache | dev | qt/qtdeclarative | Status: MERGED | -2 | 0 |