Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.7.0
-
None
-
31b972b12db4497f1c3ba1762d784c7315e75b62
Description
The following does not work correctly in QML. The problem seems to be occurring early – AST::RegExpLiteral node only keeps a single SourceLocation, and that location has a length of 1. The script parser uses that to turn the regexp /[a-zA-z]{2,4}/ into the QString expression "/". After passing through the rewriter we end up with a binding with an empty expression.
import Qt 4.7
Rectangle {
id: container
width: 400
height: 400
TextInput { id: strInput;
validator: QRegExpValidator {
regExp: /[a-zA-z]{2,4}/
}
}
}
Attachments
Issue Links
- is required for
-
QTBUG-8025 Integrate with JavaScript RegExp object
- Closed