Details
Description
Reject invalid rename requests in qmlls. Reasons might be:
- C++ defined properties and signals
- on usages of C++ defined properties
- on usages of C++ defined signals
- on usages of C++ defined properties changed signals
- also for signal handlers on C++ defined signals
- also for onChanged handlers on C++ defined properties
- C++ defined object
- Qml Objects defined in C++ cannot be renamed
- Qml Objects imported from other modules cannot be renamed
- it would be super unintuitive if a rename renames symbols in a different project/module
- Stuff in comments + keywords
- Invalid names
- see also https://262.ecma-international.org/7.0/#prod-IdentifierName for valid JS names (WTF? unicode escapes are allowed as identifiers???)
- see also property documentation for allowed property names at https://doc.qt.io/qt-6/qtqml-syntax-objectattributes.html#property-attributes :
Property names must begin with a lower case letter and can only contain letters, numbers and underscores.
- but the engine does not care and accepts all kinds of weird stuff (รค, $, unicode escapes of allowed characters)
Attachments
For Gerrit Dashboard: QTBUG-114951 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
489351,22 | qmlls: preparation to check names during rename | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
489447,31 | qmlls: check user-supplied names on renaming | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |