Details
-
Bug
-
Status: Closed
-
P2: Important
-
Resolution: Done
-
5.9.1
-
None
Description
In the work to port kate to QmlScript I encountered another RegExp bug in QML. I unfortunately haven't been able to write a reduced test-case yet, but what happened was that lastIndex on a global RegExp started not null, if the same RegExp literal had been matched before, even though the new match was started from a new literal.
I am assuming there is a cache of compiled RegExps somewhere, and we probably are lacking a reset of lastIndex when a new RegExp gets a cached value instead of a new C++ object.
Attachments
Issue Links
- is duplicated by
-
QTBUG-64525 Regex does return null every second time it is executed
-
- Closed
-
For Gerrit Dashboard: QTBUG-62175 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
201012,6 | Fix reuse of regexp objects by regexp literals | 5.9 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
201995,1 | Fix reuse of regexp objects by regexp literals | dev | qt/qtdeclarative | Status: ABANDONED | 0 | 0 |