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:
@@ -29,8 +29,6 @@
|
||||
#include <clangdocument.h>
|
||||
#include <clangfilepath.h>
|
||||
#include <clangtranslationunitupdater.h>
|
||||
#include <projectpart.h>
|
||||
#include <projects.h>
|
||||
#include <clangtranslationunit.h>
|
||||
#include <clangdocuments.h>
|
||||
#include <unsavedfiles.h>
|
||||
@@ -44,7 +42,6 @@ using ClangBackEnd::ClangCodeCompleteResults;
|
||||
using ClangBackEnd::FilePath;
|
||||
using ClangBackEnd::Document;
|
||||
using ClangBackEnd::UnsavedFiles;
|
||||
using ClangBackEnd::ProjectPart;
|
||||
|
||||
static unsigned completionOptions()
|
||||
{
|
||||
@@ -56,12 +53,9 @@ static unsigned completionOptions()
|
||||
|
||||
TEST(ClangCodeCompleteResultsSlowTest, GetData)
|
||||
{
|
||||
ProjectPart projectPart(Utf8StringLiteral("projectPartId"));
|
||||
ClangBackEnd::ProjectParts projects;
|
||||
ClangBackEnd::UnsavedFiles unsavedFiles;
|
||||
ClangBackEnd::Documents documents{projects, unsavedFiles};
|
||||
ClangBackEnd::Documents documents{unsavedFiles};
|
||||
Document document(Utf8StringLiteral(TESTDATA_DIR"/complete_testfile_1.cpp"),
|
||||
projectPart,
|
||||
Utf8StringVector(),
|
||||
documents);
|
||||
Utf8String nativeFilePath = FilePath::toNativeSeparators(document.filePath());
|
||||
@@ -88,12 +82,9 @@ TEST(ClangCodeCompleteResults, GetInvalidData)
|
||||
|
||||
TEST(ClangCodeCompleteResultsSlowTest, MoveClangCodeCompleteResults)
|
||||
{
|
||||
ProjectPart projectPart(Utf8StringLiteral("projectPartId"));
|
||||
ClangBackEnd::ProjectParts projects;
|
||||
ClangBackEnd::UnsavedFiles unsavedFiles;
|
||||
ClangBackEnd::Documents documents{projects, unsavedFiles};
|
||||
ClangBackEnd::Documents documents{unsavedFiles};
|
||||
Document document(Utf8StringLiteral(TESTDATA_DIR"/complete_testfile_1.cpp"),
|
||||
projectPart,
|
||||
Utf8StringVector(),
|
||||
documents);
|
||||
Utf8String nativeFilePath = FilePath::toNativeSeparators(document.filePath());
|
||||
|
||||
Reference in New Issue
Block a user