aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppeditor/cppquickfixes.cpp
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2018-11-19 09:48:28 +0100
committerEike Ziller <eike.ziller@qt.io>2018-11-19 10:00:18 +0100
commit3d1d9aae2e977ef599582074e0f4faaef454a595 (patch)
tree8cd2aaba4d0ba10c46abd6ce5c10a349d2889e75 /src/plugins/cppeditor/cppquickfixes.cpp
parent40ad7ec995332b043ead31ee0739f04dd7ac0e90 (diff)
parente164717108176ee1423f3f629a8182520c2909d1 (diff)
Merge remote-tracking branch 'origin/4.8'
Conflicts: src/plugins/winrt/winrtdevicefactory.cpp Change-Id: I33b8697e2ebf2bea051d7f1144449e0743ee16a5
Diffstat (limited to 'src/plugins/cppeditor/cppquickfixes.cpp')
-rw-r--r--src/plugins/cppeditor/cppquickfixes.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/cppeditor/cppquickfixes.cpp b/src/plugins/cppeditor/cppquickfixes.cpp
index 7878ee1533..383b6a641c 100644
--- a/src/plugins/cppeditor/cppquickfixes.cpp
+++ b/src/plugins/cppeditor/cppquickfixes.cpp
@@ -2988,7 +2988,10 @@ public:
m_baseName = QLatin1String("value");
// Getter Name
- const CppCodeStyleSettings settings = CppCodeStyleSettings::currentProjectCodeStyle();
+ const Utils::optional<CppCodeStyleSettings> codeStyleSettings
+ = CppCodeStyleSettings::currentProjectCodeStyle();
+ const CppCodeStyleSettings settings
+ = codeStyleSettings.value_or(CppCodeStyleSettings::currentGlobalCodeStyle());
const bool hasValidBaseName = m_baseName != m_variableString;
const bool getPrefixIsAlreadyUsed = hasClassMemberWithGetPrefix(m_classSpecifier->symbol);
if (settings.preferGetterNameWithoutGetPrefix && hasValidBaseName && !getPrefixIsAlreadyUsed) {