mirror of
https://github.com/overte-org/overte.git
synced 2025-04-16 04:28:07 +02:00
fix moveToThread for AssignmentClient NodeList, fixes #1551
This commit is contained in:
parent
84a5d75131
commit
9095874844
4 changed files with 11 additions and 5 deletions
|
@ -174,9 +174,6 @@ void AssignmentClient::assignmentCompleted() {
|
|||
|
||||
NodeList* nodeList = NodeList::getInstance();
|
||||
|
||||
// move the NodeList back to our thread
|
||||
nodeList->moveToThread(thread());
|
||||
|
||||
// reset our NodeList by switching back to unassigned and clearing the list
|
||||
nodeList->setOwnerType(NODE_TYPE_UNASSIGNED);
|
||||
nodeList->reset();
|
||||
|
|
|
@ -29,7 +29,7 @@ void MetavoxelServer::removeSession(const QUuid& sessionId) {
|
|||
delete _sessions.take(sessionId);
|
||||
}
|
||||
|
||||
const char METAVOXEL_SERVER_LOGGING_NAME[] = "avatar-mixer";
|
||||
const char METAVOXEL_SERVER_LOGGING_NAME[] = "metavoxel-server";
|
||||
|
||||
void MetavoxelServer::run() {
|
||||
commonInit(METAVOXEL_SERVER_LOGGING_NAME, NODE_TYPE_METAVOXEL_SERVER);
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
|
||||
//
|
||||
|
||||
#include <QTimer>
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtCore/QTimer>
|
||||
|
||||
#include "Logging.h"
|
||||
#include "ThreadedAssignment.h"
|
||||
|
@ -18,6 +19,12 @@ ThreadedAssignment::ThreadedAssignment(const unsigned char* dataBuffer, int numB
|
|||
|
||||
}
|
||||
|
||||
void ThreadedAssignment::deleteLater() {
|
||||
// move the NodeList back to the QCoreApplication instance's thread
|
||||
NodeList::getInstance()->moveToThread(QCoreApplication::instance()->thread());
|
||||
QObject::deleteLater();
|
||||
}
|
||||
|
||||
void ThreadedAssignment::setFinished(bool isFinished) {
|
||||
_isFinished = isFinished;
|
||||
|
||||
|
|
|
@ -21,6 +21,8 @@ public slots:
|
|||
/// threaded run of assignment
|
||||
virtual void run() = 0;
|
||||
|
||||
virtual void deleteLater();
|
||||
|
||||
virtual void processDatagram(const QByteArray& dataByteArray, const HifiSockAddr& senderSockAddr) = 0;
|
||||
protected:
|
||||
void commonInit(const char* targetName, NODE_TYPE nodeType);
|
||||
|
|
Loading…
Reference in a new issue