Since non project files get opened in project specific clients now, the
check whether we should add annotations needs to make sure that the
marks file is part of the client project.
Change-Id: I2790d0f7feb39162686efd06bb3542684d289b95
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
When updating translations with
cmake --build . --target ts_de
(or other language ID)
- Qualifying with unknown namespace/class ::PluginSpecPrivate
- <class> lacks Q_OBJECT macro
Change-Id: Ic42d8dffea935e6b10e59223bdedb9a8a4dcf446
Reviewed-by: hjk <hjk@qt.io>
... with clangd.
As with operator++ etc, it's immediately obvious to a developer which
arguments are modified.
Change-Id: Ia2b15d5eef7848b7ed284f8d544f039fe2927292
Reviewed-by: David Schulz <david.schulz@qt.io>
This will help avoid confusion in case of multi-project sessions.
We also shorten the message a bit so it won't be cut off in the progress
bar before the project name.
Change-Id: I0e5885f89a976b14f758f9be77e7669f199cd887
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
Depending on the kind of highlighting issue we want to debug, we may or
may not be interested in the actual tokens.
Change-Id: I412126d3e97949a31f1dd5f339dc09072f28be64
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
... when highlighting with clangd.
This value is only meant for enum values, not types.
Task-number: QTCREATORBUG-27059
Change-Id: I7bb68f5deb6bb215ee3c23d995207019850a7bfc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
- Made code more self-documenting.
- Added more comments.
- Added debug output.
- Rewrote ugly redundant code checking for #ifdef & friends.
- For consistency, emit update about ifdef'ed code only
if we also report the other highlighting results.
Change-Id: Idd3cbd3c169343bcaf6b6b19330130378ac6c5d0
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>
We failed to overwrite existing characters that match the completion if
clangd also changes "." to "->" at the same time.
Note that it still doesn't work as expected if the cursor is after the
dot and before the extra character. I'm not sure yet how to fix that.
Fixes: QTCREATORBUG-27034
Change-Id: I852145fc41f34ab60d9e944783e822bc9505453b
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>
When fast switching between clients listed inside the inspector
the message response for memory usage may arrive after the model
has been destroyed.
Change-Id: I0503bb334cf21b0919316f0ac2e731472f3433bd
Reviewed-by: David Schulz <david.schulz@qt.io>
... with clangd. More specifically, for the case where we switch between
declaration and definition of a destructor. Since clangd expects the
cursor before the "~" character, we move it there.
Fixes: QTCREATORBUG-26809
Change-Id: I8ea6a060bea3545c963cb8ebbe2d3ae3a18da2d5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... when detecting output arguments with clangd.
This should lead to fewer false positives. We plan to handle false
negatives on a case-by-case basis (rather than the other way around).
Change-Id: I541b418927dc410c2ea4ea9f6c1b5a7bd291a1a8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
... with clangd.
The code is starting to look rather hacky and might need to be rewritten
completely at some point. Let's see how far we get with it.
Change-Id: I506dd410831970b9f9291b005129b4d70f397de0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
Amends 825c9ea64f to work also for member access via pointer.
Change-Id: I8ee68d0f6d93c65c2f82a63bce5baef2aa2159de
Reviewed-by: David Schulz <david.schulz@qt.io>
The location of the blocks to marked ifdefed out are not tied to a
specific editor instance, but just depend on the document content.
Change-Id: I837730dc00e1d6060dd46bbb2cfccbfa5f72e6ce
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
If the cursor is right before the "." in a member access expression,
clangd interprets it as belonging to the member instead of the base
expression, which leads to unexpected behavior.
Work around this by sending a cursor position one to the left of the
real one to clangd in such cases.
Change-Id: I429ee9189760ccb02d231acfcb94ab6cfde3cd8d
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>
... when doing function call completion with clangd.
We did not take default arguments into account. E.g. the following
declaration:
void func(int i, int j = int());
was mis-detected as taking no arguments, causing to the cursor to be at
the wrong location afterwards.
Change-Id: I522921721b0cb347ed593c43ed285ca6d02ccfee
Reviewed-by: David Schulz <david.schulz@qt.io>
... which we get from clangd's textDocument/references.
This works around https://github.com/clangd/clangd/issues/935.
Fixes: QTCREATORBUG-26574
Change-Id: I3933f30fdaca024a6e240bd0962de3d97acd0dbf
Reviewed-by: David Schulz <david.schulz@qt.io>
... passed to macros defined in a different file.
This amends e77e57420a. Contrary to our expectation, it is possible that
AST nodes that are marked as belonging (only) to a header file can
contain child nodes that belong to the main file.
Fixes: QTCREATORBUG-26553
Change-Id: I4d1d877d8e1e2dcf7d81b63aa98e1149b5514e3f
Reviewed-by: David Schulz <david.schulz@qt.io>
We need to manually refresh the documents that include the generated
header, as clangd does not know about it.
Change-Id: I8c4303ac029bbb56c01aa99b7950dcc651701678
Reviewed-by: David Schulz <david.schulz@qt.io>
The problem is fixed upstream, but this must work now.
Fixes: QTCREATORBUG-26482
Change-Id: I3b2e863efec0edf7eaa74d73eb94705aa28723cf
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
With clangd, we mis-detected variables of template types as output
parameters in certain contexts.
Change-Id: I906abd489f987351793f4ef676e4af59cdfdbf97
Reviewed-by: David Schulz <david.schulz@qt.io>