LanguageClient/ClangCodeModel: Reimplement matchers()

Don't assert when ClientRequestTask::preStartCheck() failed.

Change-Id: I157fe8fc15aa055b70823d6a54454c6eec692f88
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Jarek Kobus
2023-04-13 10:06:16 +02:00
parent 08f3d57aa1
commit f5d7765094
5 changed files with 64 additions and 3 deletions

View File

@@ -14,7 +14,6 @@
namespace LanguageClient {
template <typename Request>
class LANGUAGECLIENT_EXPORT ClientRequestTask
{
@@ -32,8 +31,10 @@ public:
void start()
{
QTC_ASSERT(!isRunning(), return);
QTC_ASSERT(preStartCheck(), m_callback({}); return);
if (!preStartCheck()) {
m_callback({});
return;
}
Request request(m_params);
request.setResponseCallback([this](const typename Request::Response &response) {
m_response = response;