From 1ea640433736d599a2ec0cb716924db1560f59a3 Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Tue, 21 Jun 2016 11:16:39 +0200 Subject: CppTools: Allow prefering getter names with "get" prefix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/plugins/cpptools/cppcodestylesettings.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/plugins/cpptools/cppcodestylesettings.h') diff --git a/src/plugins/cpptools/cppcodestylesettings.h b/src/plugins/cpptools/cppcodestylesettings.h index 60dcc2fbf6..f69d72d0ab 100644 --- a/src/plugins/cpptools/cppcodestylesettings.h +++ b/src/plugins/cpptools/cppcodestylesettings.h @@ -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 -- cgit v1.2.1