Let's not access the object state after emitting
ClangdFollowSymbol::done(), in case the receiver deletes us.
Can happen in test code.
Change-Id: Ia6c691c0f88b16476da1a6be1cedd106d9da2d53
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
Backslashes in the markup string are escaped with another backslash, so
we need to check for two consecutive ones on Windows.
Otherwise, qdoc/doxygen commands such as "\note" are interpreted as files
and trigger expensive I/O operations.
Fixes: QTCREATORBUG-29975
Change-Id: I822f57a8612274ff4112063928cab21b9d7ca792
Reviewed-by: David Schulz <david.schulz@qt.io>
So that in the CI we can simply run:
$ qtcreator -test CppEditor -load ClangCodeModel
There are some failures left, which we will tackle one by one in follow-
up patches.
Change-Id: Ic4ebcb82f6439b344ae055889a6a16d56b2e3206
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Having extra indent regions complicates the interface, the
implementation and the calling code.
Instead, derive the indent regions from the change set and let callers
opt out for the relatively few cases where indentation is not desired.
Change-Id: I49d2854830a51778534ef260fb5c9f2c7685554a
Reviewed-by: David Schulz <david.schulz@qt.io>
This makes it immediately clear that there are more specialized variants
available, which helps users make a conscious decision.
Change-Id: I35feb4bed2d91fb4f83ede6e731d9ce89fd4af3f
Reviewed-by: David Schulz <david.schulz@qt.io>
This addresses the 20th point in the master task below.
Task-number: QTCREATORBUG-28741
Change-Id: I696beda87430fbe637abba8054012fb77516e220
Reviewed-by: hjk <hjk@qt.io>
Make the c'tor of the GroupItem taking the TreeStorageBase
public instead.
This addresses the 20th point in the master task below.
Task-number: QTCREATORBUG-28741
Change-Id: I78320ec24b4e4b915ab549135fb93b45c658b9f2
Reviewed-by: hjk <hjk@qt.io>
...instead of relying on the surrounding code of the refactoring to emit the signal.
This also ensures that the signal is only emitted for files that are not opened inside
a TextEditor.
Change-Id: I6223362864014c691962d895b864f9f44c36e035
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
In normal interactive mode, users likely want fuzzy look-up, e.g. to a
non-matching overload if no exact match is present.
Fixes: QTCREATORBUG-29814
Change-Id: I55ca32c001e619d374cc015a7dd2f1564ed2a2c9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
They are reasonably standardized, and generally usable cross-plugin,
so this can help to avoid a few cross-plugin compiletime dependencies.
Change-Id: Icb2b010c3e12dee69df54ab16f6f8e90d9cffba6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Get rid of CustomTask c'tor taking 3 handlers.
If the done handler needs to be called only on
success or an error, add explicit 3rd arg of CallDoneIf type.
Task-number: QTCREATORBUG-29834
Change-Id: I10e55415587e6cac46620dd5177ad8269584583c
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
... that depend on changed headers.
When changing a header file the clangd code model is not updated for
files that including it if they are not opened in editor.
This is not to be done automatically, as it would be a performance
hazard to rescan many files, for example when changing a widely used
header.
Add a menu action to trigger such re-indexing manually to solve the
issue.
Task-number: QTCREATORBUG-27387
Change-Id: Ia8033401f847627cee041b102f9ac6f3af3dd709
Reviewed-by: Volodymyr Zibarov <gogan419@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Our approach was not fully thought through: When we got informed of a
file getting created by an ExtraCompiler, we would make it known to the
first client that came along and then forget about it. This means that
e.g. a source file including a UI header would parse fine with the first
client that opened it, but after switching the build configuration or
possibly even just touching the project file, the UI header would not be
found anymore.
Fix this by keeping the information about generated files around and
attaching them to every newly initialized client.
Note that this state should probably be kept somewhere more central.
Change-Id: Ib1d8cca9258d1962513d8d463f5d16f9ff91a048
Reviewed-by: David Schulz <david.schulz@qt.io>
... if the user tries to complete inside a comment or string.
Fixes: QTCREATORBUG-20828
Change-Id: I245e1bd16acaf696601cabe33f27210da21cc12a
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
If the user disables usage of clangd and opens a cpp file
without a project we still tried to set up the fallback clangd.
Silences a soft assert.
Change-Id: I753ce2eddb00b344b109ba4ff3da61a849767a79
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Allow to follow to the symbol definition as well as to the type
definition for the symbol under the cursor position.
Change-Id: I8ff50b33a1e739f81b0832b1b28ffc525e1f7177
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
- Rename ambiguously named "testsEnabled" property to "withPluginTests"
and fix the wrong uses.
- Move AutotestRunner out of main project file and into tests.qbs.
- Move "withAutotests" property into qtc module. We cannot remove it
from the main project file just yet, because some manual tests do not
make use of QtcManualTest at the moment.
- Do not remove the autotests from the project tree if autotests are
disabled. Instead, just disable the products.
Change-Id: I74a4cc717d9adbe53d37536b2565111e1617115b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
These trigger over 120k file exist check on my machine on startup,
just for a handful icons.
Change-Id: Ic73f0783142ed329c2f8c8b852f622e69fc306da
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
... when renaming.
For local renaming, we consider only function parameters.
Task-number: QTCREATORBUG-12051
Change-Id: I7948d69f11b97663c9bd747ae6241a82dd9bdd82
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
... in the dependent sources. That's also how the built-in code model
behaves, but clangd itself only does this when a document is saved.
Change-Id: I52d6badb0b7f063e5924c05dbf83a6e9849c9f6f
Reviewed-by: David Schulz <david.schulz@qt.io>
They were still using variables in qmake style.
Directly use CMake variables in the json.in files and remove the no
longer needed escaping of quotes.
Adds a fatal message if it detects the old style in a .json.in file for
easier porting.
Change-Id: I8de88d8db2da55781f0e9d72eda03f943723188e
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
When hovering an entry in the filter menu in the Issues view.
Also remove some categories that shouldn't be there.
Change-Id: Ifb367d69b9396c2fdc45b83ec5ffd88ac2f0eda7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
... after applying a clangd warning suppression.
Change-Id: I6b6605edd80080dcfd070b4a2f4219463674421b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>