mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 12:28:02 +02:00
mv ShutdownEventListener into class which is a child of QCoreApplication
This commit is contained in:
parent
0918d4989b
commit
7c7d727b55
2 changed files with 9 additions and 13 deletions
|
@ -58,13 +58,6 @@ AssignmentClient::AssignmentClient(Assignment::Type requestAssignmentType, QStri
|
||||||
// when the domain server hands over an assignment.
|
// when the domain server hands over an assignment.
|
||||||
QUuid nodeUUID = QUuid::createUuid();
|
QUuid nodeUUID = QUuid::createUuid();
|
||||||
nodeList->setSessionUUID(nodeUUID);
|
nodeList->setSessionUUID(nodeUUID);
|
||||||
|
|
||||||
// setup a shutdown event listener to handle SIGTERM or WM_CLOSE for us
|
|
||||||
#ifdef _WIN32
|
|
||||||
installNativeEventFilter(&ShutdownEventListener::getInstance());
|
|
||||||
#else
|
|
||||||
ShutdownEventListener::getInstance();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// set the logging target to the the CHILD_TARGET_NAME
|
// set the logging target to the the CHILD_TARGET_NAME
|
||||||
LogHandler::getInstance().setTargetName(ASSIGNMENT_CLIENT_TARGET_NAME);
|
LogHandler::getInstance().setTargetName(ASSIGNMENT_CLIENT_TARGET_NAME);
|
||||||
|
|
|
@ -29,6 +29,14 @@ AssignmentClientApp::AssignmentClientApp(int argc, char* argv[]) :
|
||||||
setvbuf(stdout, NULL, _IOLBF, 0);
|
setvbuf(stdout, NULL, _IOLBF, 0);
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
|
||||||
|
# ifdef _WIN32
|
||||||
|
installNativeEventFilter(&ShutdownEventListener::getInstance());
|
||||||
|
# else
|
||||||
|
ShutdownEventListener::getInstance();
|
||||||
|
# endif
|
||||||
|
|
||||||
|
|
||||||
setOrganizationName("High Fidelity");
|
setOrganizationName("High Fidelity");
|
||||||
setOrganizationDomain("highfidelity.io");
|
setOrganizationDomain("highfidelity.io");
|
||||||
setApplicationName("assignment-client");
|
setApplicationName("assignment-client");
|
||||||
|
@ -175,16 +183,11 @@ AssignmentClientApp::AssignmentClientApp(int argc, char* argv[]) :
|
||||||
|
|
||||||
if (numForks || minForks || maxForks) {
|
if (numForks || minForks || maxForks) {
|
||||||
// setup a shutdown event listener to handle SIGTERM or WM_CLOSE for us
|
// setup a shutdown event listener to handle SIGTERM or WM_CLOSE for us
|
||||||
# ifdef _WIN32
|
|
||||||
installNativeEventFilter(&ShutdownEventListener::getInstance());
|
|
||||||
# else
|
|
||||||
ShutdownEventListener::getInstance();
|
|
||||||
# endif
|
|
||||||
|
|
||||||
AssignmentClientMonitor monitor(numForks, minForks, maxForks, assignmentPool,
|
AssignmentClientMonitor monitor(numForks, minForks, maxForks, assignmentPool,
|
||||||
walletUUID, assignmentServerHostname, assignmentServerPort);
|
walletUUID, assignmentServerHostname, assignmentServerPort);
|
||||||
exec();
|
exec();
|
||||||
} else {
|
} else {
|
||||||
|
// setup a shutdown event listener to handle SIGTERM or WM_CLOSE for us
|
||||||
AssignmentClient client(requestAssignmentType, assignmentPool,
|
AssignmentClient client(requestAssignmentType, assignmentPool,
|
||||||
walletUUID, assignmentServerHostname, assignmentServerPort);
|
walletUUID, assignmentServerHostname, assignmentServerPort);
|
||||||
exec();
|
exec();
|
||||||
|
|
Loading…
Reference in a new issue