summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/clangdiagnosticconfigswidget.cpp
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@qt.io>2019-01-28 12:40:03 +0100
committerNikolai Kosjar <nikolai.kosjar@qt.io>2019-02-05 15:22:20 +0000
commitf6c46ce35d9018335a19d8d75fda4dfd7adf69b3 (patch)
treed996bc810d2486bc2af3eb4bd57795c7195ce0d0 /src/plugins/cpptools/clangdiagnosticconfigswidget.cpp
parentb9d3055e7218e6dc202047c4a341df51c8e8cd67 (diff)
downloadqt-creator-f6c46ce35d9018335a19d8d75fda4dfd7adf69b3.tar.gz
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>
Diffstat (limited to 'src/plugins/cpptools/clangdiagnosticconfigswidget.cpp')
-rw-r--r--src/plugins/cpptools/clangdiagnosticconfigswidget.cpp27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/plugins/cpptools/clangdiagnosticconfigswidget.cpp b/src/plugins/cpptools/clangdiagnosticconfigswidget.cpp
index a9a32a77bd..6d45b428be 100644
--- a/src/plugins/cpptools/clangdiagnosticconfigswidget.cpp
+++ b/src/plugins/cpptools/clangdiagnosticconfigswidget.cpp
@@ -319,16 +319,6 @@ public:
m_root->checked = Qt::Unchecked;
propagateDown(index(0, 0, QModelIndex()));
- // <= Qt Creator 4.8 settings provide specific levels: {"level0"}
- if (checks.size() == 1 && checks.first().startsWith("level")) {
- bool ok = false;
- const int level = checks.first().mid(5).toInt(&ok);
- QTC_ASSERT(ok, return);
- enableChecksByLevel(level);
- return;
- }
-
- // >= Qt Creator 4.9 settings provide specific checks: {c1, c2, ...}
for (const QString &check : checks) {
const QModelIndex index = indexForCheck(check);
if (!index.isValid())
@@ -437,23 +427,6 @@ private:
}
}
- void enableChecksByLevel(int level)
- {
- if (level < 0)
- return;
-
- ClazyChecksTree *node = m_levelNodes.value(level);
- QTC_ASSERT(node, return);
- const QModelIndex index = indexForTree(node);
- QTC_ASSERT(index.isValid(), return);
-
- node->checked = Qt::Checked;
- propagateUp(index);
- propagateDown(index);
-
- enableChecksByLevel(--level);
- }
-
QModelIndex indexForCheck(const QString &check) const {
if (check == "*")
return index(0, 0, QModelIndex());