Merge remote-tracking branch 'origin/6.0'

Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: I32991a77e52831dd2e24cf4a51ec252998c2d743
This commit is contained in:
Eike Ziller
2021-12-09 12:02:47 +01:00
328 changed files with 2093 additions and 709 deletions

View File

@@ -692,7 +692,7 @@ void Client::documentContentsChanged(TextEditor::TextDocument *document,
const QString method(DidChangeTextDocumentNotification::methodName);
TextDocumentSyncKind syncKind = m_serverCapabilities.textDocumentSyncKindHelper();
if (Utils::optional<bool> registered = m_dynamicCapabilities.isRegistered(method)) {
syncKind = registered.value() ? TextDocumentSyncKind::None : TextDocumentSyncKind::Full;
syncKind = registered.value() ? TextDocumentSyncKind::Full : TextDocumentSyncKind::None;
if (syncKind != TextDocumentSyncKind::None) {
const TextDocumentChangeRegistrationOptions option(
m_dynamicCapabilities.option(method).toObject());

View File

@@ -392,8 +392,10 @@ bool LanguageClientCompletionAssistProcessor::running()
void LanguageClientCompletionAssistProcessor::cancel()
{
if (m_currentRequest.has_value()) {
m_client->cancelRequest(m_currentRequest.value());
m_client->removeAssistProcessor(this);
if (m_client) {
m_client->cancelRequest(m_currentRequest.value());
m_client->removeAssistProcessor(this);
}
m_currentRequest.reset();
} else if (m_postponedUpdateConnection) {
QObject::disconnect(m_postponedUpdateConnection);

View File

@@ -75,6 +75,10 @@ void SemanticTokenSupport::reloadSemanticTokens(TextDocument *textDocument)
const TextDocumentIdentifier docId(DocumentUri::fromFilePath(filePath));
auto responseCallback = [this, filePath, documentVersion = m_client->documentVersion(filePath)](
const SemanticTokensFullRequest::Response &response) {
if (const auto error = response.error()) {
qCDebug(LOGLSPHIGHLIGHT)
<< "received error" << error->code() << error->message() << "for" << filePath;
}
handleSemanticTokens(filePath, response.result().value_or(nullptr), documentVersion);
};
/*if (supportedRequests.testFlag(SemanticRequestType::Range)) {
@@ -120,6 +124,10 @@ void SemanticTokenSupport::updateSemanticTokens(TextDocument *textDocument)
request.setResponseCallback(
[this, filePath, documentVersion](
const SemanticTokensFullDeltaRequest::Response &response) {
if (const auto error = response.error()) {
qCDebug(LOGLSPHIGHLIGHT) << "received error" << error->code()
<< error->message() << "for" << filePath;
}
handleSemanticTokensDelta(filePath,
response.result().value_or(nullptr),
documentVersion);
@@ -285,6 +293,9 @@ void SemanticTokenSupport::handleSemanticTokens(const Utils::FilePath &filePath,
m_tokens[filePath] = {*tokens, documentVersion};
highlight(filePath);
} else {
qCDebug(LOGLSPHIGHLIGHT)
<< "no data in reply to full semantic tokens request, clearing tokens"
<< m_client->name() << filePath;
m_tokens.remove(filePath);
}
}
@@ -353,8 +364,10 @@ void SemanticTokenSupport::handleSemanticTokensDelta(
tokens.setData(newData);
tokens.setResultId(tokensDelta->resultId());
} else {
qCDebug(LOGLSPHIGHLIGHT)
<< "no data in reply to semantic tokens delta request, clearing tokens"
<< m_client->name() << filePath;
m_tokens.remove(filePath);
qCDebug(LOGLSPHIGHLIGHT) << "Data cleared";
return;
}
highlight(filePath);