Commit Graph

18 Commits

Author SHA1 Message Date
Nikolai Kosjar
a0a39a0470 ClangTools: Make file selection dialog searchable/filterable
Allow filtering for open and edited documents.
Add also search functionality (triggerable by e.g. Ctrl+F).

Change-Id: Ib41400abfd3b81371afddd56b88ff1b9bf8b9bcd
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-10-01 14:42:01 +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
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
f223c094a1 ClangTools: Show hint when disabling "Build the project before analysis."
Show also the same hint as a tooltip.

Fixes: QTCREATORBUG-22382
Change-Id: If1b594994cea387d6727775ce4c28c21d51f2d86
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-06-26 08:55:10 +00:00
hjk
473a741c9f Utils: Rename FileName to FilePath
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.

Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 12:23:26 +00:00
hjk
f4c9e5e5c4 More FileName::appendPath() -> .pathAppended()
Change-Id: I403d34e4f52f758339c158efc7a11fd329e3e043
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-17 11:55:04 +00:00
hjk
6f37348b4c Replace static_casts by QOverload where possible
Mainly to get rid of the QProcess::finished deprecation warning.

Also adjust coding style in the surrounding connects when needed.

Change-Id: I12f9b248c7974b892c4a069356e578e80f8c59e9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-26 15:18:14 +00:00
Alessandro Portale
c4b07bf730 ClangTools: Modernize
modernize-use-nullptr
modernize-use-override
modernize-use-equals-default

Change-Id: I14a840c6f2972f57763cdfd4bb4483df1ec261d4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-11-08 11:40:57 +00:00
Ivan Donchevskii
be3e848c0f Clang: Don't analyze same file multiple times
Diagnostics do not depend much on project parts. But
having the same file twice can result in duplicated
diagnostics which later can cause the same fix-it
being applied twice and getting corrupted code.

Change-Id: Ie2809af7a54034b05df9383875f7c3123aea58e8
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-06-28 12:50:34 +00:00
Ivan Donchevskii
75cda95039 Clang: Add option 'Build before analysis' to project settings
Diagnostic configuration Id was already there but
not the checkbox whether to build project or not.

Change-Id: Icb5fc15bda5eed5e375cd90df1a96060b30bf57e
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-06-15 12:14:44 +00:00
Ivan Donchevskii
14d585f105 Clang: Restore custom settings for Clang-Tidy and Clazy run
If the last run used global settings do not forget
the custom configuration.

Change-Id: Ie8e0eefb18eed60fd5f6bf07392e5a0d1474c549
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-06-13 10:43:07 +00:00
Ivan Donchevskii
0d64011e47 ClangTools: Synchronize standalone tool diagnostic settings
...to the global diagnostic settings list.

It was possible to add/remove some configurations without
adding/removing them to the checks combobox.

Change-Id: I31608fd3758c385aa2fb7ce06aceeb0b91403c50
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-05-29 07:52:24 +00:00
Nikolai Kosjar
9b74948a61 ClangTools: Allow selecting diagnostic config for project
When starting the Clazy/Tidy tool, allow to select the diagnostic
configuration for the run.

As a side effect, fix a race condition where the runner could end up
with no diagnostic config (removed during run) - copy the diagnostic
config instead of referencing/querying it by the id.

Change-Id: Iedafa8f31a3bbd233d65818fe8de16add1e4d443
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-15 07:26:22 +00:00
Nikolai Kosjar
ba6f6f41d0 ClangTools: Preselect all files for first invocation
Change-Id: Iddc4f66bd35927161d2ad83234b099836a970281
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-11 12:07:55 +00:00
Nikolai Kosjar
947ea4a051 ClangTools: Remember selected files
Change-Id: I53227d0ada37b613b7312149bb8e7c15f6bf2bcc
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-11 12:07:48 +00:00
Nikolai Kosjar
1bc605d050 ClangTools: Prompt for files to analyze
If the run button is clicked, the user is prompted to select the files
for analysis.

Change-Id: I21e4ee6b7c14392a8c1a901ac7aa1c9c16e30f0d
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-11 10:48:53 +00:00