Commit Graph

14 Commits

Author SHA1 Message Date
Orgad Shaneh
dbfdcbad0c ClangTools: Fix incompatible class/struct forward-declarations
Amends 5dec97ea41.

Change-Id: I87209ee35fd4f13654a34be57f5bb1e69c1b12b0
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-01-12 10:51:03 +00:00
Jarek Kobus
e7781e2a99 ClangTools: Reuse TaskTree
Reuse it in ClangToolRunControl and DocumentClangToolRunner.
Get rid of ClangToolRunner and provide clangToolTask() method
instead.

Change-Id: I677940b325850849c5f5a60f2d320c031a4f0da0
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-01-12 10:11:44 +00:00
Jarek Kobus
64b9728a68 ClangToolsUtils: Add isVFSOverlaySupported()
Remove ClangToolRunner::supportsVFSOverlay().
Move check for modified document and vfsOverlay into
runner creator method, as it's called in the same cycle just
before the runner is about to be started.

Change-Id: I7a5df71bfa73c350862e4c7f9eae49773b6206b7
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-01-12 09:24:50 +00:00
Jarek Kobus
5dec97ea41 ClangToolRunner: Add done(const AnalyzeOutputData &) signal
Introduce AnalyzerOutputData structure that is passed inside
new done() signal. This signal replaces the finishedWithSuccess()
and finishedWithFailure() signals. The output structure contains
all the data required in clients' handlers.

Move AnalyzeUnit into clangtoolrunner.h in order to avoid
circular dependencies.

Get rid of outputFilePath(), as it's passed inside AnalyzeOutputData
now.

Inline ClangToolRunWorker::unitsToAnalyze() as it's used only once.

Change-Id: Icf9a52853c68e83f6ddfc4858dbcb830b96e1844
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-01-12 09:24:43 +00:00
Jarek Kobus
711584bb3c Make AnalyzeUnit a member of AnalyzeInputData
Get rid of run() arguments.

Change-Id: I744da2a043136e579284eb2697b9b71f476b58a9
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-01-11 10:16:04 +00:00
Jarek Kobus
d4026287d4 DocumentClangToolRunner: Remove unused getDiagnosticConfig()
Change-Id: Ia5895692b806fa7009675f4a0077a97a56a31504
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-01-11 10:06:49 +00:00
Jarek Kobus
c7b60e7d6b ClangToolRunner: Flatten the class hierarchy
Instead of creating subclasses of ClangToolRunner configure
the base class according to the tool specifics.

Change-Id: I51b611b2375571453c7f9690499d744582f035c1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-01-11 09:15:28 +00:00
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
Christian Kandeler
284817fae6 Merge CppTools into CppEditor
There was no proper separation of responsibilities between these
plugins. In particular, CppTools had lots of editor-related
functionality, so it's not clear why it was separated out in the first
place.
In fact, for a lot of code, it seemed quite arbitrary where it was put
(just one example: switchHeaderSource() was in CppTools, wheras
switchDeclarationDefinition() was in CppEditor).
Merging the plugins will enable us to get rid of various convoluted
pseudo-abstractions that were only introduced to keep up the artificial
separation.

Change-Id: Iafc3bce625b4794f6d4aa03df6cddc7f2d26716a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-01 14:53:58 +00:00
David Schulz
b40dcf6d29 ClangTools: Fix crash in document tool runner
Prevent removing refactor markers from already destroyed widgets.

Fixes: QTCREATORBUG-24982
Change-Id: Icf8950f8f8407fa8733a1ef30d05abb4a2b44dd4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-26 07:58:53 +00:00
David Schulz
d7ab6210af ClangTools: Do not show text marks for suppressed diagnostics
Do not generate marks for automatic runs
and hide them for the explicitly invoked analyzes.

Change-Id: Ic48e7b13c424c51e7e1759c588c94bbd45e6d1bb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-10-27 08:50:09 +00:00
David Schulz
ef10f3b937 ClangTools: Add QuickFixes to the editor
Change-Id: I9862231f0aa8e8274e8529e57e80eac5ececded9
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-09-04 10:14:39 +00:00
David Schulz
e176958da1 ClangTools: Add automatic clang tool runner for open documents
Fixes: QTCREATORBUG-23349
Change-Id: I81197180c9d69c7df6184f8fcbf05f2256eaf7f6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-08-28 07:20:32 +00:00