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:
Nikolai Kosjar
2018-09-25 09:41:32 +02:00
parent 25ea9a4d24
commit aa290912b8
102 changed files with 394 additions and 2388 deletions

View File

@@ -121,7 +121,7 @@ TEST_F(ClientServerOutsideProcess, SendDocumentsClosedMessage)
TEST_F(ClientServerOutsideProcess, SendCompleteCodeMessage)
{
RequestCompletionsMessage codeCompleteMessage(Utf8StringLiteral("foo.cpp"), 24, 33, Utf8StringLiteral("do what I want"));
RequestCompletionsMessage codeCompleteMessage(Utf8StringLiteral("foo.cpp"), 24, 33);
EchoMessage echoMessage(codeCompleteMessage);
EXPECT_CALL(mockClangCodeModelClient, echo(echoMessage));
@@ -130,29 +130,6 @@ TEST_F(ClientServerOutsideProcess, SendCompleteCodeMessage)
ASSERT_TRUE(client.waitForEcho());
}
TEST_F(ClientServerOutsideProcess, SendProjectPartsUpdatedMessage)
{
ClangBackEnd::ProjectPartContainer projectContainer(Utf8StringLiteral(TESTDATA_DIR"/complete.pro"));
ClangBackEnd::ProjectPartsUpdatedMessage projectPartsUpdatedMessage({projectContainer});
EchoMessage echoMessage(projectPartsUpdatedMessage);
EXPECT_CALL(mockClangCodeModelClient, echo(echoMessage));
client.serverProxy().projectPartsUpdated(projectPartsUpdatedMessage);
ASSERT_TRUE(client.waitForEcho());
}
TEST_F(ClientServerOutsideProcess, SendProjectPartsRemovedMessage)
{
ClangBackEnd::ProjectPartsRemovedMessage projectPartsRemovedMessage({Utf8StringLiteral(TESTDATA_DIR"/complete.pro")});
EchoMessage echoMessage(projectPartsRemovedMessage);
EXPECT_CALL(mockClangCodeModelClient, echo(echoMessage));
client.serverProxy().projectPartsRemoved(projectPartsRemovedMessage);
ASSERT_TRUE(client.waitForEcho());
}
void ClientServerOutsideProcess::SetUp()
{
QSignalSpy clientSpy(&client, &ConnectionClient::connectedToLocalSocket);