Details
-
Technical task
-
Resolution: Done
-
P2: Important
-
259aec7cb4 (qt/qtdeclarative/dev) 259aec7cb4 (qt/tqtc-qtdeclarative/dev) 259aec7cb4 (qt/qtdeclarative/wip/material3)
Description
For code bellow qmllint (0dc4fd240a2897c5c443a0ef6d84c416843e4938) --compiler generate warning:
Warning: main.qml:14:20: Could not compile binding for onClicked: Instruction "generate_InitializeBlockDeadTemporalZone" not implemented onClicked: {
It would be nice if qmllint can "compile" such simple assignment,
and gives warning about not existing "open2" method.
pragma ComponentBehavior: Bound import QtQuick.Controls import QtQuick.Window import QtQuick Window { Button { anchors.centerIn: parent text: "open popup" onClicked: { loader.sourceComponent = loadPageComponent; let dlg = loader.item as Popup; dlg.open2(); } } Loader { id: loader } Component { id: loadPageComponent Popup { id: myDlg Text { id: cap anchors.fill: parent text: qsTr("Some message") } onClosed: { console.log("onClosed in component"); loader.sourceComponent = undefined; } } } }
Attachments
Issue Links
- relates to
-
QTBUG-77428 Block-scoped variable declaration is hoisted in QML
- Closed
- resulted in
-
QTBUG-108362 DTZ checks are broken in QML
- Open