Commit Graph

8 Commits

Author SHA1 Message Date
Nikolai Kosjar
0d7a30cdfe ClangTools: Query the tools for supported checks
...instead of hardcoding them for a particular version of
clang-tidy/clazy.

While at it, move also the tidy/clazy widgets to ClangTools as this
simplifies feeding data to them.

Reduce also the built-in configs to a single one using clang-tidy's and
clazy's default checks as they look very reasonable and saves us some
porting effort. Also, our previous built-in configs were just too
numerous.

Change-Id: Ib9297acb7810a940b86a23a8695530506a570394
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2019-12-03 13:23:13 +00:00
Nikolai Kosjar
3090e744c2 ClangTools: Polish ClangDiagnosticConfigsWidget
* Improve distinction between built-in and custom configs by introducing
  corresponding parent nodes
* Add button to rename a config
* Make closing the dialog apply the selected config.
* Adapt also the related ClangDiagnosticConfigsSelectionWidget showing a
  combo box of the diagnostic configs and a "Manage..." button: Remove
  the combo box and show the current config as the button text.

Change-Id: Ic015df37f2532f84bd7da6cd20bfce07799a97b8
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2019-12-03 13:22:28 +00:00
Nikolai Kosjar
b895dfa382 Clang/ClangTools: Separate custom diagnostic configs
Add a separate pool of custom diagnostic configs for the
ClangTools plugin. That is, the diagnostic configs in

  Menu: Tools > C++ > Code Model

are not shared anymore with the configs at

  Menu: Tools > Analyzer > ClangTools

On plugin initialization of ClangTools, move tidy/clazy related configs
to ClangTools.

Change-Id: Id06087a58b53e466a3d7bbac669550c5fbe9899d
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-10-01 14:10:28 +00:00
Nikolai Kosjar
4750969c2b ClangTools: Move run settings to projects mode
Make the global run settings available per project in project mode and
thus remove the diagnostic config selection from the
selectable-files-dialog:

 * Extract the classes RunSettings and RunSettingsWidget instead of
   duplicating stuff.
 * Ensure to pick up the old settings
 * Add some convenience buttons/links in projects mode allowing to
   restore the global settings, to open the global settings and to
   navigate (back) to the analyzer mode.

Change-Id: I1b91b6f8e58a87a025774e4643c46e176b2a8885
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-09-27 11:46:35 +00:00
Nikolai Kosjar
1fad60153e ClangTools: Remove BasicSettingsWidget
This removes the

  [ ] Build the project before Analysis

from the run dialog as it seems unlikely that this option is useful per
project.

Change-Id: I65f2ae8d1e936883f27c360d5b7b518fd31cdf07
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-09-12 13:36:57 +00:00
Nikolai Kosjar
fc37ea4276 ClangTools: Add UI for specifying executables
Add a new group box "Executables" for this. Hide the UI for
clazy-standalone unless QTC_USE_CLAZY_STANDALONE_PATH is set as there is
no released version with the needed -export-fixes option.

Rename the previous group box from "General" to "Run Options".

Change-Id: Ia9daf66c40d3a7eea98b31d9c086886d29466490
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-09-12 13:35:01 +00:00
Nikolai Kosjar
8890a7412c ClangTools: Rename ClangToolsBasicSettings -> BasicSettingsWidget
...as it's a widget.

Change-Id: If4f151e7b8ba8c8a6c2b5deb7cba34128a902e3e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-09-12 13:34:43 +00:00
Nikolai Kosjar
c9b81d2d39 ClangTools: Rename ClangToolsConfigWidget -> SettingsWidget
Change-Id: I37ee3435054b27fd9e990f2923e6246ecb9e631f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-09-12 13:33:21 +00:00