aboutsummaryrefslogtreecommitdiffstats
path: root/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp')
-rw-r--r--share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp27
1 files changed, 17 insertions, 10 deletions
diff --git a/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp b/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp
index 8a338df93d..24dad65090 100644
--- a/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp
+++ b/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp
@@ -35,6 +35,7 @@
#include "nodeinstanceserverinterface.h"
+#include "captureddatacommand.h"
#include "changeauxiliarycommand.h"
#include "changebindingscommand.h"
#include "changefileurlcommand.h"
@@ -84,12 +85,11 @@ constexpr void (QLocalSocket::*LocalSocketErrorFunction)(QLocalSocket::LocalSock
#endif
NodeInstanceClientProxy::NodeInstanceClientProxy(QObject *parent)
- : QObject(parent),
- m_inputIoDevice(nullptr),
- m_outputIoDevice(nullptr),
- m_nodeInstanceServer(nullptr),
- m_writeCommandCounter(0),
- m_synchronizeId(-1)
+ : QObject(parent)
+ , m_inputIoDevice(nullptr)
+ , m_outputIoDevice(nullptr)
+ , m_writeCommandCounter(0)
+ , m_synchronizeId(-1)
{
connect(&m_puppetAliveTimer, &QTimer::timeout, this, &NodeInstanceClientProxy::sendPuppetAliveCommand);
m_puppetAliveTimer.setInterval(2000);
@@ -174,7 +174,8 @@ bool compareCommands(const QVariant &command, const QVariant &controlCommand)
else if (command.userType() == debugOutputCommandType)
return command.value<DebugOutputCommand>() == controlCommand.value<DebugOutputCommand>();
else if (command.userType() == changeSelectionCommandType)
- return command.value<ChangeSelectionCommand>() == controlCommand.value<ChangeSelectionCommand>();
+ return command.value<ChangeSelectionCommand>()
+ == controlCommand.value<ChangeSelectionCommand>();
}
return false;
@@ -267,6 +268,11 @@ void NodeInstanceClientProxy::handlePuppetToCreatorCommand(const PuppetToCreator
writeCommand(QVariant::fromValue(command));
}
+void NodeInstanceClientProxy::capturedData(const CapturedDataCommand &command)
+{
+ writeCommand(QVariant::fromValue(command));
+}
+
void NodeInstanceClientProxy::flush()
{
}
@@ -365,12 +371,13 @@ void NodeInstanceClientProxy::sendPuppetAliveCommand()
NodeInstanceServerInterface *NodeInstanceClientProxy::nodeInstanceServer() const
{
- return m_nodeInstanceServer;
+ return m_nodeInstanceServer.get();
}
-void NodeInstanceClientProxy::setNodeInstanceServer(NodeInstanceServerInterface *nodeInstanceServer)
+void NodeInstanceClientProxy::setNodeInstanceServer(
+ std::unique_ptr<NodeInstanceServerInterface> nodeInstanceServer)
{
- m_nodeInstanceServer = nodeInstanceServer;
+ m_nodeInstanceServer = std::move(nodeInstanceServer);
}
void NodeInstanceClientProxy::createInstances(const CreateInstancesCommand &command)