CppEditor: Make value vs const ref return type configurable

... in the quickfix settings.
Also change the default: With mandatory RVO and move semantics, value
return types are the right choice most of the time.

Fixes: QTCREATORBUG-25790
Change-Id: I68fc6c616358478ba893101b3e04aa6bbbe79348
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This commit is contained in:
Christian Kandeler
2022-09-12 17:36:52 +02:00
parent 75e35cc4f2
commit 4119181762
7 changed files with 27 additions and 15 deletions

View File

@@ -129,6 +129,7 @@ public:
MissingNamespaceHandling cppFileNamespaceHandling = MissingNamespaceHandling::CreateMissing;
QString memberVariableNameTemplate = "m_<name>";
QStringList valueTypes; // if contains use value. Ignores namespaces and template parameters
bool returnByConstRef = false;
std::vector<CustomTemplate> customTemplates;
};
} // namespace CppEditor