Clang: Move QLocalServer in ConnectionClient

Before the QLocalServer was in the ConnectionServer so more than one
client could connect to the server. But we never used that possibility
which made the hand shaking much more difficult. It is now moved
in the client, so that there is always a QLocalServer.

Change-Id: Ifa357074b0c0809434c49d23b1cee38496f72f43
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Marco Bubke
2016-08-17 15:29:37 +02:00
parent 45c667d52c
commit f70bf3d2d1
44 changed files with 1170 additions and 351 deletions

View File

@@ -41,6 +41,7 @@
#include <utils/smallstringvector.h>
#include <QBuffer>
#include <QTextCursor>
#include <QTextDocument>
@@ -74,9 +75,10 @@ protected:
NiceMock<MockSearchHandle> mockSearchHandle;
NiceMock<MockSymbolQuery> mockSymbolQuery;
MockRefactoringClientCallBack callbackMock;
QBuffer ioDevice;
ClangRefactoring::RefactoringClient client;
ClangBackEnd::RefactoringConnectionClient connectionClient{&client};
RefactoringEngine engine{connectionClient.serverProxy(), client, mockFilePathCaching, mockSymbolQuery};
ClangBackEnd::RefactoringServerProxy serverProxy{&client, &ioDevice};
RefactoringEngine engine{serverProxy, client, mockFilePathCaching, mockSymbolQuery};
QString fileContent{QStringLiteral("int x;\nint y;")};
QTextDocument textDocument{fileContent};
QTextCursor cursor{&textDocument};