Tests: Fix compile and code

Change-Id: I2f2a8a4ff9e7bcd3138b93b177e07f2aa3850fcb
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Christian Stenger
2020-10-20 07:38:54 +02:00
parent ab8cda95a6
commit 05ecdba5d8
2 changed files with 8 additions and 7 deletions

View File

@@ -52,6 +52,7 @@ INCLUDEPATH += $$IDE_SOURCE_TREE/src/plugins/qmldesigner/components/propertyedit
INCLUDEPATH += $$IDE_SOURCE_TREE/src/plugins/qmldesigner/components/debugview INCLUDEPATH += $$IDE_SOURCE_TREE/src/plugins/qmldesigner/components/debugview
INCLUDEPATH += $$IDE_SOURCE_TREE/src/plugins/qmldesigner/components/edit3d INCLUDEPATH += $$IDE_SOURCE_TREE/src/plugins/qmldesigner/components/edit3d
INCLUDEPATH *= $$IDE_SOURCE_TREE/src/libs/3rdparty INCLUDEPATH *= $$IDE_SOURCE_TREE/src/libs/3rdparty
INCLUDEPATH *= $$IDE_SOURCE_TREE/src/libs/sqlite
include($$IDE_SOURCE_TREE/src/plugins/qmldesigner/designercore/designercore-lib.pri) include($$IDE_SOURCE_TREE/src/plugins/qmldesigner/designercore/designercore-lib.pri)

View File

@@ -32,26 +32,26 @@ namespace QmlDesigner {
TestConnectionManager::TestConnectionManager() TestConnectionManager::TestConnectionManager()
{ {
m_connections.emplace_back("Editor", "editormode"); connections().emplace_back("Editor", "editormode");
} }
void TestConnectionManager::writeCommand(const QVariant &command) void TestConnectionManager::writeCommand(const QVariant &command)
{ {
TestConnectionManager::writeCommand(command); ConnectionManager::writeCommand(command);
m_writeCommandCounter++; writeCommandCounter()++;
static int synchronizeId = 0; static int synchronizeId = 0;
synchronizeId++; synchronizeId++;
SynchronizeCommand synchronizeCommand(synchronizeId); SynchronizeCommand synchronizeCommand(synchronizeId);
QLocalSocket *socket = m_connections.front().socket.get(); QLocalSocket *socket = connections().front().socket.get();
writeCommandToIODevice(QVariant::fromValue(synchronizeCommand), socket, m_writeCommandCounter); writeCommandToIODevice(QVariant::fromValue(synchronizeCommand), socket, writeCommandCounter());
m_writeCommandCounter++; writeCommandCounter()++;
while (socket->waitForReadyRead(100)) { while (socket->waitForReadyRead(100)) {
readDataStream(m_connections.front()); readDataStream(connections().front());
if (m_synchronizeId == synchronizeId) if (m_synchronizeId == synchronizeId)
return; return;
} }