fix for registration of meta types in Socket

This commit is contained in:
Stephen Birarda 2015-10-08 18:17:24 -07:00
parent 9d949da19c
commit 1cd76bb937
5 changed files with 4 additions and 8 deletions

View file

@ -39,8 +39,6 @@
const QString ASSIGNMENT_CLIENT_TARGET_NAME = "assignment-client";
const long long ASSIGNMENT_REQUEST_INTERVAL_MSECS = 1 * 1000;
int hifiSockAddrMeta = qRegisterMetaType<HifiSockAddr>("HifiSockAddr");
AssignmentClient::AssignmentClient(Assignment::Type requestAssignmentType, QString assignmentPool,
quint16 listenPort, QUuid walletUUID, QString assignmentServerHostname,
quint16 assignmentServerPort, quint16 assignmentMonitorPort) :

View file

@ -16,7 +16,7 @@
#include "HifiSockAddr.h"
#include "NetworkLogging.h"
static int hifiSockAddrMetaTypeId = qMetaTypeId<HifiSockAddr>();
static int hifiSockAddrMetaTypeId = qRegisterMetaType<HifiSockAddr>();
HifiSockAddr::HifiSockAddr() :
_address(),

View file

@ -94,6 +94,6 @@ namespace std {
QHostAddress getLocalAddress();
Q_DECLARE_METATYPE(HifiSockAddr)
Q_DECLARE_METATYPE(HifiSockAddr);
#endif // hifi_HifiSockAddr_h

View file

@ -60,8 +60,6 @@ const QHostAddress DEFAULT_ASSIGNMENT_CLIENT_MONITOR_HOSTNAME = QHostAddress::Lo
const QString USERNAME_UUID_REPLACEMENT_STATS_KEY = "$username";
class HifiSockAddr;
using namespace tbb;
typedef std::pair<QUuid, SharedNodePointer> UUIDNodePair;
typedef concurrent_unordered_map<QUuid, SharedNodePointer, UUIDHasher> NodeHash;

View file

@ -31,8 +31,8 @@ Socket::Socket(QObject* parent) :
QObject(parent),
_synTimer(new QTimer(this))
{
qRegisterMetaType<Packet*>();
qRegisterMetaType<PacketList*>();
qRegisterMetaType<Packet*>("Packet*");
qRegisterMetaType<PacketList*>("PacketList*");
connect(&_udpSocket, &QUdpSocket::readyRead, this, &Socket::readPendingDatagrams);