Clang: Add tooltip action to remove specific warnings/checks

...from the diagnostic configuration.

If no custom diagnostic configuration is set in Projects Mode > Clang,
one is created and set for the current project. Otherwise the current
custom diagnostic set in the project settings is modified.

Change-Id: I5c48280c90f0e807e7333122d504dda302a8b0a9
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
Nikolai Kosjar
2019-01-28 12:40:03 +01:00
parent b9d3055e72
commit f6c46ce35d
9 changed files with 226 additions and 79 deletions

View File

@@ -27,6 +27,7 @@
#include "cppcodemodelsettings.h"
#include "cpptoolsplugin.h"
#include "cpptools_clazychecks.h"
#include <coreplugin/documentmanager.h>
#include <coreplugin/editormanager/editormanager.h>
@@ -287,4 +288,14 @@ UsePrecompiledHeaders getPchUsage()
return UsePrecompiledHeaders::Yes;
}
QString clazyChecksForLevel(int level)
{
QStringList checks;
for (const Constants::ClazyCheckInfo &check : Constants::CLAZY_CHECKS) {
if (check.level == level)
checks << check.name;
}
return checks.join(',');
}
} // CppTools