While it's nice to see my code spreading,
I still prefer to have it at one place.
Change-Id: I7bdb13c47ed7e96227deeb14b0a8070aa40148de
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
When CMake was run it would cause an update, which would have a
cancelAndWaitForFinished on the future interface.
The CppTools would have the future interface added on all updates, and
even though an indexing job would be finished, it would be picked up as
active and cancelled, which would be interpreted as action from the user
to cancel the indexing and cause a full reindex.
This patch makes sure that if an indexing job has finished, it doesn't
register as active, and only the jobs that actually do some work, and
will be finished will wait for the cancel signal.
Change-Id: If8a4db2a4a7a5707a360db84affe794ab0678d38
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
So far it was only possible to combine TextEditorFactory, BaseTextEditor
and TextEditorWidget directly.
That TextEditorWidget is also directly a QPlainTextEdit made it
impossible to "decorate" the text editor widget with something else
without a lot of effort.
Make it possible to create a text editor factory that returns an
arbitrary widget, as long as it can be "cast" to a TextEditorWidget with
either qobject_cast or Aggregation::query. That way the TextEditorWidget
instance can be attached to the editor widget via Aggregation.
Adapt other code that accesses TextEditorWidget from editors
accordingly. Introduce a common method how to do that.
Change-Id: I72b8721f3a8a8d8281c39af75253e9c80cbe1250
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: David Schulz <david.schulz@qt.io>
... by letting callers pass in a generator function.
This takes some load off the UI thread for larger projects.
For now only used by the QbsProjectManager, which can provide a thread-
safe generator function due to the project data existing in "value"
form.
Task-number: QTCREATORBUG-18533
Change-Id: I525dea36a4c4079bd1bd5a4fff844617547d56f1
Reviewed-by: hjk <hjk@qt.io>
There's nothing shared here, only ever one copy. Ideally, this
should be const outside CppToolsPlugin, but some settings
are modified directly.
Change-Id: I775b9151a244b3cc44d28bc992a041c42d234a18
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
We keep getting bug reports from users who forgot to set a compiler in
their kit and then get confused by (misleading) warnings from the code
model.
Improve the situation by detecting the condition that a C/C++ project's
current kit does not have a C/C++ compiler and showing a warning for
that in the issues pane.
Task-number: QTCREATORBUG-23247
Change-Id: I10164e85ad595f3a386340e7813d1f3e40fbecb5
Reviewed-by: hjk <hjk@qt.io>
...that opens the documentation page for the current diagnostic.
Change-Id: I398fdc82bb118a80536acbb12420a9bac84e66c9
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
No need to waste a (badly named) header file on that one type.
Also fix typo in enum value.
Change-Id: I0cd4e3cda9383c3ab197ae6788666324a1dce43d
Reviewed-by: hjk <hjk@qt.io>
This reverts commit b114f77d8a as
"--driver-mode=cl" apparently still disables exceptions.
Task-number: QTCREATORBUG-23000
Change-Id: I9c49d971fafda5e1aca8445f8921e50f323d368f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Amends 5165c037eb.
Gentoo has the standard library headers installed in e.g.
<installdir>/include/g++-v8 and we excluded those. MinGW with the
standard library headers in <installdir>/include/c++ was whitelisted.
Instead of whitelistening more dirs that could contain standard library
headers, regard
<installdir>/include
<installdir>/include-fixed
as gcc internal include paths to remove. These seem to be stable across
distributions.
Task-number: QTCREATORBUG-23330
Change-Id: I44965d2030b4ea5a9dd269400faf19c3df89f5a6
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Clang invoked with --driver-mode=cl will map "-Wall" to "-Weverything",
thus enabling -Wc++98-compat-pedantic and way more options.
Fix this by escaping "-Wall" in the cl mode, effectively passing in
"/clang:-Wall" instead of "-Wall".
This fixes what 5675169e56 addressed also
for ClangTools.
Change-Id: Ideb7bab923d0359e8039b61e9d53c8765de79c29
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
...as unchecking the root item in the tree has the same effect.
Change-Id: I960ea2c09a71dad3b0ba3dfb38a19055653354cd
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
...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>
* 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>
...or if requested with QTC_CLANG_USE_TOOLCHAIN_MACROS=1.
Change-Id: I6d2f35b69393a7039271cc651aa514cdb686522e
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
The ClangTools plugin tests open a project and immediately trigger a
build afterwards. We checked whether CppModelManager got already data
from the project manager, but this alone was racy for the mentioned use
case as e.g. the QbsProjectManager might still be in parsing mode and
thus the build was not triggerable. Check for the parsing state, too.
While at it, simplify the code by using QTest::qWaitFor(), which also
takes care of posted events.
Change-Id: Id298695b2e67578def42275bac4ea31f4a39edf2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>