| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
All members were already const, but this makes it clear at all points of
use that these data structures are immutable.
Change-Id: Iea615c090bde462c445d15223caccc561b0c713d
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
|
|
|
|
|
|
|
| |
... in CppModelManager. Not all accesses are mutually exclusive.
Change-Id: I87fb50db35c5fdfa401f08ad221ca053911eac07
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Switching back and forth between targets or build configurations could
result in an arbitrary amount of C++ parser threads running at the same
time, wasting valuable resources.
We now cancel a currently running parser thread when starting a new one
for the same project.
Fixes: QTCREATORBUG-24890
Change-Id: Ie1afc4971515fcad01dae182578fd77daa642cec
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
|
|
|
|
|
|
|
| |
Its presence is confusing.
Change-Id: I61986e970e0f58cded5b97dae2cd28abcdb3ecff
Reviewed-by: hjk <hjk@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Similar to QT_RESTRICTED_CAST_FROM_ASCII to avoid the need for
decorations in user code.
At the same time, drop some convenience constructors and functions
in CommandLine and Icon essentially serving the same purpose.
Change-Id: Ida4e5ac19c2da0a4298a97b2a8e1511d56bbb79d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
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>
|
|
|
|
|
|
|
| |
Amends 9c3420120e.
Change-Id: Iba8b1069bf4468119c7f518c562e4229141ac66b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Each call of CppModelManager::updateSourceFiles detaches the current
snapshot.
The extra compilers where set up and triggered individually, and
resulted in individual updateSourceFiles calls with the single result
file of the extra compiler. For Qt Creator this would lead to 200
calls in quick succession after project load, potentially leading to a
freeze of multiple seconds.
Instead of updating the result files of the extra compilers individually
after project load, integrate the update into the regular project source
file update. So we end up with only a single call of updateSourceFiles.
For this the project updater needs to trigger the extra compilers, and
wait for all to finish as well as the regular project part update,
before
triggering the parser.
Task-number: QTCREATORBUG-25783
Change-Id: I34f6df0fc0f96bcb42ee65019bee39cf49176c1f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Note that we used to encode the information about symbol visibility and
static-ness in the icons, which we can't do anymore, because clangd does
not provide this information.
On the upside, this change likely fixes a ton of bugs, as our own outline
was rather "quirky".
Change-Id: I099f11ec4e3c6f52cd461fb43080bbdde3bed5e5
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
| |
Change-Id: I2fce65ad340f18292fc0286233e78aaf769a130d
Reviewed-by: hjk <hjk@qt.io>
|
|
|
|
|
| |
Change-Id: I522a415d76fbc5332e5cc1fdfd2d7ab19cb9ed64
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
|
| |
Change-Id: I3d4f39e34e65cde3df7b7c19570e3a54d0625d53
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
| |
Change-Id: Ie97e484bcdeaa0cb2f5d04b3c79ace55ff2e426c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
|
|
|
|
|
|
| |
They may differ in a containerized setup.
Change-Id: Ib7e60fdd69f56e8e22bad3dfbc246e7de2fe9cd4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
|
| |
Still some missing bits as some QString members had different meanings
depending on their context.
Change-Id: Ib48eab54498974a26bbd5123cbffeefee5f7e79c
Reviewed-by: hjk <hjk@qt.io>
|
|
|
|
|
|
|
|
| |
The ClangCodeModel's RefactoringEngine implements all operations now and
thus does not have to be excluded anywhere.
Change-Id: Ie3c2107d02e13463fc85f1a5319454db2c45915f
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
| |
Change-Id: Iaa58e3ee2e74b1a1210850f944df942e3669d247
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Some compilers have outdated defaults; e.g. the current Apple clang on
my test machine sets __cplusplus to 199711L (whereas earlier releases
already used 201402L ...).
Amends 9c3420120e.
Change-Id: I8708b41f6d616ca0f1b73f72473f4612e463bff6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Note that we do not use the LSP rename functionality. We do "manual"
renaming the same way as in the built-in code model, but based on the
references found by clangd.
Change-Id: Ifa5597efe5c89c8f9204a4f5323bc755544696cf
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|\
| |
| |
| | |
Change-Id: Ic839ab43a723ab22cc83e5b0d823ec6121cb6701
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Do not wait for the previous update to finish before starting the next
update.
Amends: 6d7e5eb8d17194b124c8986d670ff96fda96f0f3
Change-Id: Ic8d43b56949cbf024832afc85e54a31db29b11ac
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This makes more sense than using the clang defaults.
Task-number: QTCREATORBUG-25562
Change-Id: I796d29bb4e81e5e257efea998dcab037efd8a717
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If the user has enabled clangd (default is off), we start up one instance
per project when it is opened/changed (including build config switches),
and trigger background indexing.
So far, the index is used to provide results for locators and "Find
Usages".
Per-document functionality such as semantic highlighting and completion
is still provided by libclang.
Change-Id: I12532fca1b9c6278baab560e7238cba6189cde9f
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Makes TestTreeItem programming language agnostic.
By moving the "query" methods to CppTools, the cohesion within these
methods is improved, i.e. information crosses the AutoTest <-> CppTools
border fewer times. Furthermore, it allows the CppTools plugin to see
how its data is being used, allowing it to optimize its queries
behind the scenes.
Change-Id: I0a60140abaca1193d500605dfa2812b4d937d94c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
|
|
|
|
|
|
| |
... in various places
Change-Id: Ic6c0c1b9437a1ed402105c7a14a1f5f9454a68d4
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
That is, if the user specifies a custom base class, we check whether its
constructor takes a "QObject *parent" parameter, and if it does, we give
the derived class one as well.
This is technically a heuristic, but the pattern is pretty stable in the
Qt world.
Fixes: QTCREATORBUG-25156
Change-Id: Ie64440929df61cca7258d6d692c5de62970f9a65
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code was pushing an additional QFutureInterface through the whole
chain of functions, which was used for canceling. But since it was never
started (and never finished, and never used for reporting results),
calling waitForFinshed on it never had any effect with Qt5 and locks up
with Qt6.
Instead of using a separate QFutureInterface, use the actual QFuture
that is available and intended for it.
Fixes: QTCREATORBUG-24902
Change-Id: I5a49bcecc9cf70fbffa93aee4293004f9369df58
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
... at the second argument.
The logic is as follows: The clang code model checks whether the set of
completions contains any signals. If so, it instructs the built-in code
model to analyze the AST to find out whether the completion location was
at the second argument of a call to QObject::connect(). In that case, we
filter out all non-signals, because they are not valid at that location.
Fixes: QTCREATORBUG-13558
Change-Id: I9c7d0bd16161c723aef822280626cd06ece7df93
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
... and support it in the ClangCodeModel.
This allows users to get function signature(s) displayed regardless of
where exactly the cursor is on the function call.
Fixes: QTCREATORBUG-19394
Change-Id: I033e8774db93680bfc3ee52610b817e0ef8ccc76
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
|
| |
Task-number: QTCREATORBUG-24098
Change-Id: Id1804a31162d0239659de33c1700354494c11689
Reviewed-by: hjk <hjk@qt.io>
|
|
|
|
|
| |
Change-Id: I19d4dc445d82fd24361f1eb752d9f35ccadd3efb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: Id2c4b098084808070ef91de13c8338184e52141d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
| |
The exact storage type does not really matter here.
Change-Id: Iefec40f0f5909c8e7ba3415db4a11962694e1b38
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QtVersion to utils/cpplanguage_details.h which already contains similar
flags.
BuildTargetType to ProjectExplorer, next to BuildTargetInfo (but not in the
same header to not pull that in everywhere).
Removes dependency on ProjectPart from RawProjectPart.
Change-Id: I5791065e4266f20c2657ee4b1b594df04b238a1c
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The VcsBaseSubmitEditor uses CppModelManager to collect the symbol names
from the affected files for completion in the commit message.
Move the C++ code model code into CppModelManager, register it in the
plugin manager, and call it via QObject means from the submit editor.
This avoids a hard dependency from VcsBase to CppTools.
Change-Id: I2fb34dbef153c1414820d711e7fc5596bcac1691
Reviewed-by: hjk <hjk@qt.io>
|
|
|
|
|
|
|
|
|
| |
The reasoning in 1b4766e26c6b did not take into account that the scope
of QT_NO_JAVA_STYLE_ITERATORS may change over time, as done with
f70905448f6 in Qt base.
Change-Id: Ib1966ff26c4d36d5f62e149d6b45baa4aecf825d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
|
|
|
|
|
|
|
| |
... and unrelated cosmetic changes.
Change-Id: I591b17fd5289831e701b683f8fb47816efd1fa67
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Visual C++ sets 1MiB as stack size, macOSX has 512KiB.
Both crash with a specified project.
MinGW sets 2MiB as stack size, the specified project loads
just fine.
Fixes: QTCREATORBUG-22496
Change-Id: I6f19e74a681977e4fe1dceee292ea9c838999a1a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
Provide the source path to track a generated file source. You can for
example get the modified time stamp for the source file and use it for the
generated file content.
Task-number: QTCREATORBUG-21876
Change-Id: Ia422e128c5cb7a3dce88960f126152c2f65afb41
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
We do not build texteditor files in unit-tests so some tricks
were required to make ClangFormatIndenter available.
First simple unit-test proofs it builds and runs.
Change-Id: I81d5ea099bd27fd1c1ed8b5b7877299dcc62a67f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
| |
Change-Id: Iaf02e4d026f1ac8b216833d83cd7a735e21ff60a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
|
|
|
|
|
|
|
|
| |
We want to use them in the backend processes too so it's nice to share them
in Utils. A concrete size was added too because they should be serialized.
Change-Id: Id5eb8f46643d5159f034fc9559f68a08d7e5847a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Tracks application state, and signals when it is changed.
Supports forcing blocked state with reference counting.
Change-Id: Ic173d42446b1b08bd4a1e7c1acf38c68644d30b3
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
|
|
|
|
|
|
|
| |
Use (and therefore test) the method actually used in production code.
Change-Id: I4317517ef8a1779df4d46af3905790012ee98645
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It makes sense to unify the indenter creation by replacing
the CppCodeStylePreferencesFactory instead of removing it.
We are reusing the same options page but with different
kind of settings.
With this change wizards will no more be confused by missing
factory and will create the proper indenter.
Fixes: QTCREATORBUG-21516
Change-Id: I38964d5fa1f2257617c66a1441db723d239a3237
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
|
| |
We use "Builtin" and "Clang" as prefixes, not suffixes.
Change-Id: I6926aeb8f005176ef420c4421c257e3df61ee0b7
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
...to reduce file locking on Windows caused by clangbackend's
parse/reparse jobs.
Considering inactive application state should help for external VCS
operations, e.g. on the command line. However, activating Qt Creator
while such a VCS operation runs might still lead to undesired behavior,
but this should be the less common case.
VCS operations started from within Qt Creator should see less locking
conflicts as we know when they start and finish. However, we just avoid
starting new jobs - there might be still jobs running.
Pending or new jobs will be started once Qt Creator is activated again
and all VCS operations finished.
Task-number: QTCREATORBUG-15449
Change-Id: I5f04c34f006e66162368efbdd58bd822a706f35e
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
|