Commit Graph

20 Commits

Author SHA1 Message Date
Christian Kandeler
5693c518bc Utils: Rename ProcessLinkCallback to something less clumsy
Change-Id: Icce4995f4aa886524dc3eedb7cf9ba72adbe8783
Reviewed-by: hjk <hjk@qt.io>
2022-06-03 13:23:28 +00:00
Jarek Kobus
8cd9a2dd12 ModelManagerSupport: Get rid of UsagesCallback from findUsages()
It's not used currently.

Change-Id: Ic3625b0f3c53c09089a361453f29ac639692cffb
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-02 08:52:55 +00:00
Jarek Kobus
b9f0663741 ModelManagerSupport: Get rid of UsagesCallback from globalRename()
It's not used currently.

Change-Id: Id859251f69abf33de3431d1e8b561aedefbb4651
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-02 08:41:33 +00:00
Artem Sokolovskii
6b8277fcd2 ClangTools: Remove foreach / Q_FOREACH usage
Task-number: QTCREATORBUG-27464
Change-Id: I1c4711d87e5f95fc1653dd9aa6448b105d017435
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-24 08:02:52 +00:00
Christian Kandeler
70ec0cfff1 ClangCodeModel: Make use of clangd's "switchSourceHeader" extension
This allows us to switch between headers and sources with different base
names and/or locations, using symbol matching heuristics.

Task-number: QTCREATORBUG-16385
Change-Id: I2d9c07f412d70b75322ed65d491982d78674483d
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-19 09:54:34 +00:00
Christian Kandeler
52959ce472 CppEditor: Acknowledge the existence of clangd
Stop pretending to be super generic. Instead, let interested code know
directly whether a document is under clangd's control.
This saves code and makes the logic easier to understand.

Change-Id: Ia19d0ec6c4e83926379a7d17ca53896bee3a50e1
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-11 07:41:44 +00:00
Artem Sokolovskii
dea72a4003 CppEditor: Remove foreach / Q_FOREACH usage part 2
Task-number: QTCREATORBUG-27464
Change-Id: I352bf37bd017e7381fbd7b050fbb55c9a73bd668
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-09 13:30:46 +00:00
Christian Kandeler
969b1f711f CppEditor: Remove RefactoringEngine
Another useless indirection.

Change-Id: Icfcc0704a1056d8002a674edbe74b946cb56ff27
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-04 10:05:31 +00:00
Christian Kandeler
6da7babc4a ClangCodeModel: Remove libclang-based completion and function hints
Change-Id: I742fb14b1aba3ba1f35a5c80bf553d2a735cac48
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-02 10:31:05 +00:00
Christian Kandeler
c21774f0a7 ClangCodeModel: Remove libclang-based locator filter
Change-Id: I1c588a7bfdee773662d1956e9a998040794b8c9d
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-04-29 11:35:10 +00:00
Christian Kandeler
e045af7e69 ClangCodeModel: Remove libclang-based outline support
Change-Id: Ic7a7b0cfe1d3eb822dbad610fc84f29676404505
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-04-28 11:34:46 +00:00
Christian Kandeler
52d9def5e9 ClangCodeModel: Remove libclang-based tooltip support
Change-Id: I63d934fc3d480e3c5198e7db1a595b3309e89533
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-04-28 11:26:04 +00:00
Christian Kandeler
f2c267f328 ClangCodeModel: Remove libclang fallback for "follow symbol"
... and "switch between declaration/definition".
It's either clangd or built-in code model now.
Use the opportunity to dissolve the pointless FollowSymbolInterface
class hierarchy, which introduced a confusing parallel inheritance
chain.

Change-Id: I792ad55656c5dd9f10c6b4db7c5c36cf7be45125
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-04-28 09:47:52 +00:00
hjk
25f5771aa4 Rename QtSupport::BaseQtVersion to QtVersion
... and the Utils::QtVersion enum to Utils::QtMajorVersion to avoid
conflicts.

Change-Id: Ib688c67388272b7204a91444155f60b8c18a56bd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-01-24 12:13:19 +00:00
Christian Kandeler
0c53c2daef CppEditor: Do not overwrite extra selections from language client
The broken libclang-based implementation used to remove the correct
results we got from clangd.

Task-number: QTCREATORBUG-26339
Task-number: QTCREATORBUG-26596
Change-Id: I9b7c1214c376b616fe204986ed37c287e2307f81
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-11-23 16:44:37 +00:00
Christian Kandeler
d7c7089ff3 ClangCodeModel: Restart clangd fallback client
... on fallback project part change.

Change-Id: Icfc355443b4d6bb3c94eae27c2d23bbd9f681211
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-21 09:23:38 +00:00
Christian Kandeler
8c86b9bca1 CppEditor: Make sure fallback project part is up to date
... with regards to the session include paths.
Amends 0636238429.

Fixes: QTCREATORBUG-26323
Change-Id: I8e2cd5f5e87d9dc3d2df3f943e13599bc7139768
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-19 12:20:47 +00:00
Christian Kandeler
0b86b455b0 CppEditor: Put the locator filters into one file
These classes are strongly related, so no need to spread them around.

Change-Id: I4258b0c4198b3c650454ac734d7e52e09f46a4eb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-07 08:09:42 +00:00
Christian Kandeler
548e19370e CppEditor: Remove CppToolsBridge & friends
This redirection did nothing except to horribly obfuscate the code.
Note that most callers already accessed the model manager directly, and
some bridge functions were not called at all.

Change-Id: Ic1c728afe79bf98544da23a1955ee82d0dbde94f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-06 09:49:36 +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