forked from qt-creator/qt-creator
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 <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user