diff options
author | BogDan Vatra <bogdan.vatra.ford@kdab.com> | 2016-07-29 11:52:22 +0300 |
---|---|---|
committer | BogDan Vatra <bogdan@kdab.com> | 2016-09-08 14:44:40 +0000 |
commit | c14a857ddb7f53e1cf8bbcc28ad7b1b9ca5db8cc (patch) | |
tree | 50d4d9118ef79ca1beea3bcfd518236c9bca0ae2 /src/remoteobjects/qremoteobjectsourceio.cpp | |
parent | 18cdd36ab105b0a1b375563812be2b1b08f9f666 (diff) |
Generate, send and check class signature for .rep generated classes
If the signature mismatch it will not complete the connection and will
signal the error.
Change-Id: Idd4a7a5290bb60d7428e16047a1b82db5e52b372
Reviewed-by: Continuous Integration (KDAB) <build@kdab.com>
Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
Diffstat (limited to 'src/remoteobjects/qremoteobjectsourceio.cpp')
-rw-r--r-- | src/remoteobjects/qremoteobjectsourceio.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/remoteobjects/qremoteobjectsourceio.cpp b/src/remoteobjects/qremoteobjectsourceio.cpp index 65a554e..2fe910b 100644 --- a/src/remoteobjects/qremoteobjectsourceio.cpp +++ b/src/remoteobjects/qremoteobjectsourceio.cpp @@ -96,7 +96,7 @@ bool QRemoteObjectSourceIo::enableRemoting(QObject *object, const SourceApiMap * } new QRemoteObjectSource(object, api, adapter, this); - serializeObjectListPacket(m_packet, {QRemoteObjectPackets::ObjectInfo{api->name(), api->typeName()}}); + serializeObjectListPacket(m_packet, {QRemoteObjectPackets::ObjectInfo{api->name(), api->typeName(), api->objectSignature()}}); foreach (ServerIoDevice *conn, m_connections) conn->write(m_packet.array, m_packet.size); if (const int count = m_connections.size()) @@ -259,7 +259,7 @@ void QRemoteObjectSourceIo::handleConnection() QRemoteObjectPackets::ObjectInfoList infos; foreach (auto remoteObject, m_remoteObjects) { - infos << QRemoteObjectPackets::ObjectInfo{remoteObject->m_api->name(), remoteObject->m_api->typeName()}; + infos << QRemoteObjectPackets::ObjectInfo{remoteObject->m_api->name(), remoteObject->m_api->typeName(), remoteObject->m_api->objectSignature()}; } serializeObjectListPacket(m_packet, infos); conn->write(m_packet.array, m_packet.size); |