aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cpptools/cppcodemodelsettings.h
diff options
context:
space:
mode:
authorNikolai Kosjar <[email protected]>2018-11-08 12:05:46 +0100
committerNikolai Kosjar <[email protected]>2018-11-08 13:14:19 +0000
commitc8c642dde0ab32a25942e970a8a332694f47c10c (patch)
tree2f539260ee06e2ccfb7eb86801503ea655ed51a2 /src/plugins/cpptools/cppcodemodelsettings.h
parent4a09a6a2cfcad5014a4ab2617bf131c2437df1b8 (diff)
Clang: Fix crash when removing diagnostic config
1. Create some Qt Console Application from the wizard 2. Open Tools > Options > C++ > Code Model 2.1 Click "Manage..." and create a custom configuration "custom" and finish with OK. 2.2 Set "custom" as diagnostic config. 3. Analyze > "Clang-Tidy and Clazy..." 3.1 Use "Custom Settings" 3.2 Click "Manage..." and remove "custom" ==> Crash The crash happened because the code model used an invalid diagnostic config id. The invalid id came from the settings, which were not correctly upated. Fixes: QTCREATORBUG-21273 Change-Id: I5242f7c92e121eec8558fa7923139bb3d759c676 Reviewed-by: Ivan Donchevskii <[email protected]>
Diffstat (limited to 'src/plugins/cpptools/cppcodemodelsettings.h')
-rw-r--r--src/plugins/cpptools/cppcodemodelsettings.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/cpptools/cppcodemodelsettings.h b/src/plugins/cpptools/cppcodemodelsettings.h
index bc91fbd1b8e..92e52554c2e 100644
--- a/src/plugins/cpptools/cppcodemodelsettings.h
+++ b/src/plugins/cpptools/cppcodemodelsettings.h
@@ -55,6 +55,7 @@ public:
public:
Core::Id clangDiagnosticConfigId() const;
void setClangDiagnosticConfigId(const Core::Id &configId);
+ void resetClangDiagnosticConfigId();
const ClangDiagnosticConfig clangDiagnosticConfig() const;
ClangDiagnosticConfigs clangCustomDiagnosticConfigs() const;