LanguageClient: remove codeassist proposal handler

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>
This commit is contained in:
David Schulz
2021-09-15 11:35:19 +02:00
parent bd39697ca4
commit e7f6abc084
9 changed files with 134 additions and 115 deletions

View File

@@ -77,6 +77,7 @@ using Range = std::tuple<int, int, int>;
} // namespace ClangCodeModel
Q_DECLARE_METATYPE(ClangCodeModel::Internal::Tests::Range)
Q_DECLARE_METATYPE(IAssistProposal *)
namespace ClangCodeModel {
namespace Internal {
@@ -1885,7 +1886,7 @@ void ClangdTestCompletion::getProposal(const QString &fileName,
connect(client(), &ClangdClient::proposalReady, &loop, [&proposal, &loop](IAssistProposal *p) {
proposal = p;
loop.quit();
});
}, Qt::QueuedConnection);
editor->editorWidget()->invokeAssist(Completion, nullptr);
timer.start(5000);
loop.exec();