Commit Graph

19 Commits

Author SHA1 Message Date
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
Jarek Kobus
2da897f60b DiagnosticView: Remove unused field
Change-Id: I0f423c70c7868547547313e85fa27b6640a39f5c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-22 11:06:21 +00:00
Christian Kandeler
16bc10a66f ClangTools: Finish "disable checks" logic
- Take project settings into account.
- Fix some bugs in the initial implementation.

Task-number: QTCREATORBUG-24852
Change-Id: I4960fc68ef0b27777a152ca871dfa554fea72c51
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-30 11:38:08 +00:00
Christian Kandeler
a10a1acd23 ClangTools: Fix terminology
Make it clear we don't disable specific diagnostics, but the checks that
triggered them.

Change-Id: Ie9b5568a1749f59d80827e342cb5299ebfc63227
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-25 11:27:04 +00:00
Christian Kandeler
ab91e547da ClangTools: Allow to disable a specific type of diagnostic
... from the results list.
This is much more convenient for the user than having to locate the
diagnostic in the settings first.
This patch deals with the global settings. We plan to offer the same for
project-level settings in a follow-up patch.

Task-number: QTCREATORBUG-24852
Change-Id: I7a97189c393048b98b9c2cdb6f21861a34670e8f
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-17 12:40:58 +00:00
Nikolai Kosjar
1b4de8d769 ClangTools: Add help context menu entry
...that opens the documentation page for the current diagnostic.

Change-Id: I398fdc82bb118a80536acbb12420a9bac84e66c9
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-01-13 14:33:55 +00:00
Nikolai Kosjar
07ec6de8d9 ClangTools: Improve filtering
Replace the filter line edit in the toolbar by a tool button that pop
ups a dialog. In the dialog, the available checkers can be
selectd/unselected to filter the diagnostic view. Also, the diagnostic
view can be limited to diagnostics with fixits so that these can be
selected and applied as the next step.

For convience, add also some context menu entries to modify the filter
with regard to the current diagnostic.

Change-Id: Ifba3028805840658d72a39516c2b02da9864d4a6
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2019-12-04 14:07:04 +00:00
Nikolai Kosjar
4d09e77719 ClangTools: Move checkbox from view's header to toolbar
Avoid the following issues with the diagnostic view's header:
* Clicking on the header to reverse the sorting is somewhat pointless as
  there is only one column.
* It takes vertical space.
* The checkbox to select/unselect all fixits for application is hacky,
  not drawn nicely on Windows and macOS and its position is somewhat
  problematic as on hover the dock widgets handles are popping up.
* To check the check box, one needs to click within the check box
  rectangle, which is a pretty small area of the screen.

Instead, add a proper checkbox with a label to the toolbar (apparently
this needs some adaptions to our ManhattenStyle). By positioning it
before the "Apply Fixits" button, we can streamline the work flow.

Change-Id: I4ff40c3641487428feb1cd8305470dc5219d048c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2019-12-03 13:23:58 +00:00
Nikolai Kosjar
ffd2fee26a ClangTools: Use std::unique_ptr in DiagnosticView
Change-Id: Iee8faf18178b6190b4d8b2bc2816ea00d680bd3f
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-12 13:36:35 +00:00
Nikolai Kosjar
4eaedac72f ClangTools: Move check box in diagnostic view to the left
...so it's closer to other related data and controls (expand/collapse
marker).

The details of the fixits status are displayed in the tooltip now.

Change-Id: I9f1a9e9562572195b52a097ae9278647fecf6cb8
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-12 09:32:10 +00:00
Nikolai Kosjar
26a6cf3bb3 ClangTools: Organize diagnostics by file path
* Introduce the file path as a top level node.
* Remove the location column.
  * Encode the line/column information in the DisplayRole, as for the
    Clang Code Model tooltips.
  * Double click on a diagnostic opens the editor.

Change-Id: I4c263537cc04c3c4feb6ccd5c395d60d8bee0bc3
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-01-31 10:34:44 +00:00
Nikolai Kosjar
954d9f85f8 ClangTools: Make diagnostic view sortable
Fixes: QTCREATORBUG-20660
Change-Id: I57ed5c4071d7db8143e9e1e31d8b86a4d59d33ff
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-01-25 14:32:27 +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
2d97b5950c Clang: Add checkbox for fix-its column header
Make possible to select or deselect all fix-its.

Change-Id: I2ff88afb0c451092752ee2cd7c9f083e24033500
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-06-21 13:10:40 +00:00
Nikolai Kosjar
72aac9573d ClangTools: Avoid horizontal scrolling in the diagnostics view
Also, show the diagnostic text in the tooltip because the text might be
elided in the view now.

Change-Id: I7f38acacf72d68d7e4b696a01c7a0d1a76b4ed98
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-23 10:47:56 +00:00
Nikolai Kosjar
26b09af277 ClangTools: Allow applying fixits
Add a new column to the view that allows to check diagnostics with
fixits. The checked fixits can then be applied with the also new "Apply
Fixits" button in the toolbar.

Some corner cases are not yet handled:
 * File is open in editor
 * File changed in the mean time

Change-Id: I3d3f353a4150699a0d082f2a4348e331a4213bcf
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-16 07:10:39 +00:00
Nikolai Kosjar
1251eb87bb ClangTools: Go to location on enter/space
Change-Id: I865a445207bf161213761b607f1f447b79ef7359
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-11 12:18:31 +00:00
Nikolai Kosjar
a10cd337c7 ClangTools: Rename some classes and files
...to some more generic names since they are not anymore specific to the
clang static analyzer.

 * ClangStaticAnalyzerDiagnosticView --> DiagnosticView
 * ClangStaticAnalyzerDiagnosticFilterModel --> DiagnosticFilterModel
 * ClangStaticAnalyzerPreconfiguredSesssionTest -->
    PreconfiguredSessionTests
 * clangstaticanalyzerprojectsettingswidget.* -->
   clangtoolsdiagnosticwidget.*

Change-Id: Ifd34f207d31dc24d6a97654aca76ff27b5025547
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-11 12:08:20 +00:00