Details
-
Suggestion
-
Resolution: Fixed
-
P2: Important
-
None
Description
When renaming a symbol under cursor Creator seems not to check if the new name is used already. This can lead to bad errors afterwards.
What I mean in detail:
- create a simple C++ project
- add some global variables or class variables with different types OR/AND functions with different types of return values and parameter lists
- rename the different variables/functions step by step using the 'Rename symbol under cursor' feature to one of them that has already been used (or rename all to a complete new one) - but always use the same name for the variables or functions
Current behaviour:
- Creator won't refuse the renaming
- if you try to compile it later - you'll get the issues (conflicting declarations, XYZ has a previous declaration, call of overloaded XYZ() is abigous,...)
Suggested behaviour:
- Creator should check if the wanted new name is already in use
- if already in use Creator should bring up a warning or maybe even completely refuse to rename to this name
I know renaming depends normally on senseful name choices and the developer is the one to blame if this ends up in a mess. But especially inside bigger projects this would be helpful
Attachments
Issue Links
- replaces
-
QTCREATORBUG-1348 Rename symbol under cursor does not check for conflicts
- Closed
-
QTCREATORBUG-7691 Refactoring should check for new name before applying rename
- Closed