CppTools: Allow prefering getter names with "get" prefix

We default to "foo()" for e.g. a member variable "m_foo", but other
coding styles require "getFoo()".

Task-number: QTCREATORBUG-16452
Change-Id: I9ccfdf88e4c469bc1c06fde855ad754faf2bd238
Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
Nikolai Kosjar
2016-06-21 11:16:39 +02:00
parent b928a1ce46
commit 1ea6404337
7 changed files with 156 additions and 27 deletions

View File

@@ -80,6 +80,8 @@ public:
// b
bool alignAssignments;
bool preferGetterNameWithoutGetPrefix;
void toSettings(const QString &category, QSettings *s) const;
void fromSettings(const QString &category, const QSettings *s);
@@ -90,6 +92,9 @@ public:
bool operator==(const CppCodeStyleSettings &s) const { return equals(s); }
bool operator!=(const CppCodeStyleSettings &s) const { return !equals(s); }
static CppCodeStyleSettings currentProjectCodeStyle();
static CppCodeStyleSettings currentGlobalCodeStyle();
/*! Returns an Overview configured by the current project's code style.
If no current project is available or an error occurs when getting the