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>
They are two different tools and should not have been merged into a
single runner in the first place.
People can now actively decide to run clazy if they really want to,
rather than getting confronted with its increasingly irrelevant
complaints by default.
We keep the common settings widget for now.
Change-Id: I3c2b1db8c07ff5c128700d4a1deefd710967568a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
And instead of qgetenv.
Takes Qt Creator's setting at "Environment > System > Environment" into
account, which makes it easier on some platforms to set them (e.g.
macOS), can be configured differently in different settings paths, and
potentially can be changed at runtime (depending on usage).
Change-Id: I7678b8e429b5eff79f87eb637f6f2131be43d904
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
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>
Mostly unused #include's, also sort them or reduce scope.
A few namespaces, ...
Change-Id: I9ee71e07de7157c9942125672addf87dd41e78f1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
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>
ProjectInfo, ProjectPart and ProjectUpdateInfo used to carry pointers
to Project and/or Toolchain, even though they were used in contexts
where these pointers were either unsafe to access or not guaranteed to
be valid anymore, which made their use difficult and error-prone.
We turn these classes into pure value types by copying in all relevant
information before the first async operation takes place.
Fixes: QTCREATORBUG-25678
Change-Id: I1914b0dbda6c7dfba6c95e5e92f2d69977755590
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
The clazy tool in particular can be exceedingly slow on Windows.
Increase the default timeout and also add a hook to set the timeout at
runtime via the environment.
Change-Id: I94c46ce03f8348fb239870df4d5627bf8d545307
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This one can take quite some time even outside the CI.
Change-Id: I0d57d536fb23a1fec6d4cc8c0709fb699afdf9a2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The ClangTools and the AutoTest plugins use an internal
mechanism to load and configure a project when performing
their integrated unit tests.
Both assumed to have exactly one kit present for these
tests.
Make it possible to have more kits present when starting
with existing settings or if more kits get automatically
generated when starting with clean settings.
Change-Id: If2bc66320c4854f1d34a19d17107e8f0b7d64d39
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Adds a button for analyze file to all text editors that have a C++
source file open.
Task-number: QTCREATORBUG-23348
Change-Id: If08f2969304ee0817f00c9ee5ff8c0d4f96f7f72
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Special accessors to the repeatedly used C and C++ cases to denoise
and slim down user code. Plus some code cosmetics nearby.
Change-Id: Iba4662bd4731d8c4256e658529f39d5c995691ce
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Print the error text we are showing in the info bar. For example:
QWARN : ...testProject(simple.pro) Error: Failed to build the project.
FAIL! : ...testProject(simple.pro) 'finishedSuccessfully' returned FALSE. ()
Change-Id: I7df91909dc4974a2c3aa9d44cb7511222517198c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The two plugins plugins added resource files which were referenced with
the same name, namely
:/unit-tests
Make the names unique.
Change-Id: If63e762663f3f61b15f826d76ffcd2eb66873db7
Reviewed-by: hjk <hjk@qt.io>
...in order to not run into parse errors in qstring.h involving
* C++17
* >= Qt 5.14
* stdlibc++ of gcc 5.3/5.4
Change-Id: I8c06f90a88a4dd18503a81b68433604eb3bc9556
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
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>
We can provide the run settings explicitly instead of writing to the
settings.
Change-Id: Ibb9ef0280c14315ff7ba72be75dfd04c50d84484
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
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>
Ideally, we would build the particular file before running the analyzer,
but not every project manager supports that.
For now, skip building the project for this action.
Change-Id: Ibc516c41dd0dbeb7b17b44c0ac35ae4b46ae801d
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Explicitly remove any by default enabled checks (e.g. static analyzer)
otherwise we get more diagnostics than expected.
Change-Id: I53e63a10001be8027e880dac01000bdca4a8f920
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This fixes the currently failing tests
ClangToolsUnitTests::testProject(simple.qbs)
ClangToolsUnitTests::testProject(simple.pro)
which produce more diagnostics now due to the upgrade to clang 8.
Sanitize the test by specifying exactly the tidy/clazy checks we are interested
in. This should avoid maintenance on clang upgraded (pulling in new checks that
will fail the test).
While at it, fix writing the settings for the tests, which worked by accident
so far.
Change-Id: If8bf5076ad7141faa93eced611334ac609f0cf92
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The name "KitInformation" does not properly convey the fact that it
represents a certain *aspect* of a kit. The same goes for
"KitConfigWidget", which in addition was inconsistent with
"KitInformation".
We now use "KitAspect" and "KitAspectWidget".
Change-Id: I9804ee4cedc4d61fad533ea1dd4e4720e67fde97
Reviewed-by: hjk <hjk@qt.io>
These functions require core plugin so they can't go
to utils library. At the same time to use them in
ProjectExplorer plugin there are not too many choices
where to put them without introducing new dependencies.
Change-Id: I3cccccffaae8ac4bbce924fd809b5423da5dc503
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
List of checks does not give enough flexibility to
select/unselect specific checks. The tree fixes that.
Also remove Clang-Tidy checks line edit because it is
now integrated into the tree mode as an alternative way
of providing checks by pressing "Plain text edit" button.
'cpptools_clangtidychecks.h' is generated using python
script 'generateClangTidyChecks.py' and clang-tidy
from our LLVM/Clang 6.0 build.
Change-Id: I2ed1738cb2cbbf8dac6aba563469f06f69b11593
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
...since it's superseded by the tidy integration.
Change-Id: Idafa5e1fb5129b1af8e42231a664684d4b90821f
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
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>
We use custom clang executable and it does not make
sense anymore to give a choice of changing it.
Change-Id: Icf86042ac3fcd08c320ef2bbdaabef1102b023b5
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Use simple project with only few ClangTidy and Clazy warnings.
Change-Id: Idfbbeb653c5f610bda502c3ec23e7497f503f8a9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>