Details
-
Suggestion
-
Resolution: Done
-
Not Evaluated
-
Qt Creator 4.15.0
-
None
-
-
4119181762 (qt-creator/qt-creator/master) 4119181762 (qt-creator/qt-creator/9.0)
Description
I have a large project with thousands of classes. Almost all classes which are passed via getters/setters are copyable by value (small or implicitly shared).
Whenever I use "Generate getter and setter" and similar refactoring methods, I have to manually correct the returned const ref. On the other hand, managing the hundreds of custom value classes in Creator's settings just isn't feasible.
Why not offer a setting to "return by value" by default?
Or some intelligence that any copyable object will be returned by value, and only non-copyable objects will be returned by reference?