-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.6.2
-
None
-
-
5204751af (dev), 56f8a5c45 (6.9), ea1700d00 (6.8), 7e0f1caec (tqtc/lts-6.5)
The docs say:
Function declarations in QML documents can, and should, contain type annotations.
https://doc.qt.io/qt-6/qtqml-javascript-hostenvironment.html#type-annotations-and-assertions
But QML using annotations fails to parse:
import QtQuick
import QtWebEngine
WebEngineView {
id: webView
url: "https://www.qt.io"
onAudioMutedChanged: function (muted: bool) {}
}
$ qml /tmp/web.qml QQmlApplicationEngine failed to load component [file:///tmp/web.qml:8:41:] Type annotations are not permitted in function parameters in JavaScript functions qml: Did not load any objects, exiting.
| For Gerrit Dashboard: QTBUG-123341 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V |
| 625302,2 | Type annotations: Document limitation regarding signal handlers | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
| 625828,2 | Type annotations: Document limitation regarding signal handlers | 6.9 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
| 625879,2 | Type annotations: Document limitation regarding signal handlers | 6.8 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
| 625939,3 | Type annotations: Document limitation regarding signal handlers | tqtc/lts-6.5 | qt/tqtc-qtdeclarative | Status: MERGED | +2 | 0 |