forked from qt-creator/qt-creator
Clang: Remove project tracking on clangbackend side
...as it is not needed. Just provide the compilation arguments as part of the Document. As a side effect, re-initializing the backend after a crash is cheaper and will not freeze the UI anymore (referenced bug). Task-number: QTCREATORBUG-21097 Change-Id: I866e25ef1fd5e4d318df16612a7564469e6baa11 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -577,7 +577,6 @@ void ClangCompletionAssistProcessor::sendFileContent(const QByteArray &customFil
|
||||
|
||||
BackendCommunicator &communicator = m_interface->communicator();
|
||||
communicator.documentsChanged({{m_interface->fileName(),
|
||||
Utf8String(),
|
||||
Utf8String::fromByteArray(info.unsavedContent),
|
||||
info.isDocumentModified,
|
||||
uint(m_interface->textDocument()->revision())}});
|
||||
@@ -658,12 +657,10 @@ bool ClangCompletionAssistProcessor::sendCompletionRequest(int position,
|
||||
|
||||
const Position cursorPosition = extractLineColumn(position);
|
||||
const Position functionNameStart = extractLineColumn(functionNameStartPosition);
|
||||
const QString projectPartId = CppTools::CppToolsBridge::projectPartIdForFile(filePath);
|
||||
communicator.requestCompletions(this,
|
||||
filePath,
|
||||
uint(cursorPosition.line),
|
||||
uint(cursorPosition.column),
|
||||
projectPartId,
|
||||
functionNameStart.line,
|
||||
functionNameStart.column);
|
||||
setLastCompletionPosition(filePath, position);
|
||||
|
||||
Reference in New Issue
Block a user