Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.9.0 Beta1
-
None
-
360a614f9 (dev), 0fc2b4def (6.9)
Description
Since Qt 6.9 we get a qmllint error for exec usage of a regex. Do we need to import something here?
import QtQuick Text { id: root QtObject { id: d property string link: "" function dummy() { let reg = /href="(.*?)"/g; let match = reg.exec(root.text); if (!match) { // no link d.link = ""; return; } d.link = match[1]; if (reg.exec(root.text)) { console.warn("More than one link found!"); } } } }
Warning: regex.qml:13:20: Member "exec" not found on type "undefined" [missing-property] let match = reg.exec(root.text); ^^^^ Warning: regex.qml:20:12: Member "exec" not found on type "undefined" [missing-property] if (reg.exec(root.text)) { ^^^^
Attachments
For Gerrit Dashboard: QTBUG-132783 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
617321,5 | QmlCompiler: Implement MoveRegExp in the type propagator | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
617636,3 | QmlCompiler: Implement MoveRegExp in the type propagator | 6.9 | qt/qtdeclarative | Status: MERGED | +2 | 0 |