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:
@@ -33,9 +33,7 @@ using namespace ClangBackEnd;
|
||||
void ClangAsyncJobTest::BaseSetUp(ClangBackEnd::JobRequest::Type jobRequestType,
|
||||
IAsyncJob &asyncJob)
|
||||
{
|
||||
projects.createOrUpdate({ProjectPartContainer(projectPartId)});
|
||||
|
||||
const QVector<FileContainer> fileContainer{FileContainer(filePath, projectPartId)};
|
||||
const QVector<FileContainer> fileContainer{FileContainer(filePath)};
|
||||
document = documents.create(fileContainer).front();
|
||||
documents.setVisibleInEditors({filePath});
|
||||
documents.setUsedByCurrentEditor(filePath);
|
||||
@@ -51,10 +49,8 @@ JobRequest ClangAsyncJobTest::createJobRequest(const Utf8String &filePath,
|
||||
{
|
||||
JobRequest jobRequest(type);
|
||||
jobRequest.filePath = filePath;
|
||||
jobRequest.projectPartId = projectPartId;
|
||||
jobRequest.unsavedFilesChangeTimePoint = unsavedFiles.lastChangeTimePoint();
|
||||
jobRequest.documentRevision = document.documentRevision();
|
||||
jobRequest.projectChangeTimePoint = projects.project(projectPartId).lastChangeTimePoint();
|
||||
|
||||
return jobRequest;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user