make the LNL the parent of any Nodes it adds

This commit is contained in:
Stephen Birarda 2015-05-28 16:58:58 -07:00
parent 29d3ca85d9
commit 046828ee5d
3 changed files with 6 additions and 4 deletions

View file

@ -488,7 +488,7 @@ SharedNodePointer LimitedNodeList::addOrUpdateNode(const QUuid& uuid, NodeType_t
return matchingNode;
} else {
// we didn't have this node, so add them
Node* newNode = new Node(uuid, nodeType, publicSocket, localSocket, canAdjustLocks, canRez, connectionSecret);
Node* newNode = new Node(uuid, nodeType, publicSocket, localSocket, canAdjustLocks, canRez, connectionSecret, this);
if (nodeType == NodeType::AudioMixer) {
LimitedNodeList::flagTimeForConnectionStep(LimitedNodeList::AddedAudioMixer);

View file

@ -41,8 +41,9 @@ const QString& NodeType::getNodeTypeName(NodeType_t nodeType) {
}
Node::Node(const QUuid& uuid, NodeType_t type, const HifiSockAddr& publicSocket,
const HifiSockAddr& localSocket, bool canAdjustLocks, bool canRez, const QUuid& connectionSecret) :
NetworkPeer(uuid, publicSocket, localSocket),
const HifiSockAddr& localSocket, bool canAdjustLocks, bool canRez, const QUuid& connectionSecret,
QObject* parent) :
NetworkPeer(uuid, publicSocket, localSocket, parent),
_type(type),
_connectionSecret(connectionSecret),
_linkedData(NULL),

View file

@ -47,7 +47,8 @@ class Node : public NetworkPeer {
public:
Node(const QUuid& uuid, NodeType_t type,
const HifiSockAddr& publicSocket, const HifiSockAddr& localSocket,
bool canAdjustLocks, bool canRez, const QUuid& connectionSecret = QUuid());
bool canAdjustLocks, bool canRez, const QUuid& connectionSecret = QUuid(),
QObject* parent = 0);
~Node();
bool operator==(const Node& otherNode) const { return _uuid == otherNode._uuid; }