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)) { ^^^^