mirror of
https://github.com/overte-org/overte.git
synced 2025-04-15 09:49:41 +02:00
Merge branch 'protocol' of https://github.com/birarda/hifi into protocol
This commit is contained in:
commit
3abde577e2
2 changed files with 8 additions and 4 deletions
|
@ -282,7 +282,7 @@ void DomainServer::setupNodeListAndAssignments(const QUuid& sessionUUID) {
|
|||
// register as the packet receiver for the types we want
|
||||
PacketReceiver& packetReceiver = nodeList->getPacketReceiver();
|
||||
packetReceiver.registerListener(PacketType::RequestAssignment, this, "processRequestAssignmentPacket");
|
||||
packetReceiver.registerListener(PacketType::DomainConnectRequest, this, "processConnectRequestPackets");
|
||||
packetReceiver.registerListener(PacketType::DomainConnectRequest, this, "processConnectRequestPacket");
|
||||
packetReceiver.registerListener(PacketType::DomainListRequest, this, "processListRequestPacket");
|
||||
packetReceiver.registerListener(PacketType::DomainServerPathQuery, this, "processPathQueryPacket");
|
||||
packetReceiver.registerListener(PacketType::NodeJsonStats, this, "processNodeJSONStatsPacket");
|
||||
|
|
|
@ -75,11 +75,13 @@ QMetaMethod PacketReceiver::matchingMethodForListener(PacketType::Value type, QO
|
|||
QSet<QString> possibleSignatures { QString("%1(%2)").arg(slot).arg(NON_SOURCED_PACKET_LISTENER_PARAMETERS) };
|
||||
|
||||
if (!NON_SOURCED_PACKETS.contains(type)) {
|
||||
const QString SOURCED_PACKET_LISTENER_PARAMETERS = "QSharedPointer<NLPacket>,QSharedPointer<Node>";
|
||||
static const QString SOURCED_PACKET_LISTENER_PARAMETERS = "QSharedPointer<NLPacket>,QSharedPointer<Node>";
|
||||
static const QString TYPEDEF_SOURCED_PACKET_LISTENER_PARAMETERS = "QSharedPointer<NLPacket>,SharedNodePointer";
|
||||
|
||||
// a sourced packet must take the shared pointer to the packet but optionally could include
|
||||
// a shared pointer to the node
|
||||
|
||||
possibleSignatures << QString("%1(%2)").arg(slot).arg(TYPEDEF_SOURCED_PACKET_LISTENER_PARAMETERS);
|
||||
possibleSignatures << QString("%1(%2)").arg(slot).arg(SOURCED_PACKET_LISTENER_PARAMETERS);
|
||||
}
|
||||
|
||||
|
@ -88,11 +90,13 @@ QMetaMethod PacketReceiver::matchingMethodForListener(PacketType::Value type, QO
|
|||
foreach(const QString& signature, possibleSignatures) {
|
||||
QByteArray normalizedSlot =
|
||||
QMetaObject::normalizedSignature(signature.toStdString().c_str());
|
||||
|
||||
|
||||
// does the constructed normalized method exist?
|
||||
methodIndex = object->metaObject()->indexOfSlot(normalizedSlot.toStdString().c_str());
|
||||
|
||||
break;
|
||||
if (methodIndex >= 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (methodIndex < 0) {
|
||||
|
|
Loading…
Reference in a new issue