This can occur in situations such as clangd crashing. A similar guard is
used in the perform() function, but can still crash in cancel() or
handleSignatureResponse() if the client is destroyed beforehand.
Fixes: QTCREATORBUG-27096
Change-Id: Ib33d306c5411bc31bc13de399e6c2ad0a89462f4
Reviewed-by: David Schulz <david.schulz@qt.io>
Do not pretend to support multiple message types, while no other
messages are actually implemented by us or even known to exist in the
wild.
Change-Id: I49ee2118b2e10f265ac641c195df8a9e5c97951c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
A tracked assist processor gets indirectly deleted in the client
destructor and the reset function. This makes sure no processor accesses
a deleted or restarted client.
Fixes: QTCREATORBUG-27404
Change-Id: Ib264eb4b166f1705bd734299642b93bca0a402c3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Removes noise from the interface. Using specialized clangd processors
that redirect the proposals for testing purposes is an overall cleaner
solution.
Change-Id: Ia4f3d4720765f0533c5530a2a5c7db3cc971e0be
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The interface can be used for checking the context of a codeassist
request to determine
the correct processor that has to be created.
Change-Id: I47ddb05c46399566e27bae21711f11a3a4132c3f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Since MessageId is always valid (needs to be fixed separately)
use an optional to store whether we have a request running.
Change-Id: I7a1f136a09d776b33509bc914247d11076abeaa5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Currently the ownership of the processor is unknown to the codeassist
when running an async operation. Move the ownership of the processor to
the assist and delete the processor after the proposal was completed.
Change-Id: I6a2e023c47cbc876669dba866bee12b481447cb7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Fixes crash when the processor reports a result after the code assistant
was destroyed.
Change-Id: I8588d3d6acad69f1ec6302e8ba09d642ebbb77f1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Instead of just unsetting the function assist provider and quick fix
assist provider reset it to the previous provider.
Change-Id: I46c5c2f14234e3da08480dd103e4634859447d57
Reviewed-by: Christian Stenger <christian.stenger@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>