mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:23:54 +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.
|
||||
QUuid nodeUUID = QUuid::createUuid();
|
||||
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
|
||||
LogHandler::getInstance().setTargetName(ASSIGNMENT_CLIENT_TARGET_NAME);
|
||||
|
|
|
@ -29,6 +29,14 @@ AssignmentClientApp::AssignmentClientApp(int argc, char* argv[]) :
|
|||
setvbuf(stdout, NULL, _IOLBF, 0);
|
||||
# endif
|
||||
|
||||
|
||||
# ifdef _WIN32
|
||||
installNativeEventFilter(&ShutdownEventListener::getInstance());
|
||||
# else
|
||||
ShutdownEventListener::getInstance();
|
||||
# endif
|
||||
|
||||
|
||||
setOrganizationName("High Fidelity");
|
||||
setOrganizationDomain("highfidelity.io");
|
||||
setApplicationName("assignment-client");
|
||||
|
@ -175,16 +183,11 @@ AssignmentClientApp::AssignmentClientApp(int argc, char* argv[]) :
|
|||
|
||||
if (numForks || minForks || maxForks) {
|
||||
// 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,
|
||||
walletUUID, assignmentServerHostname, assignmentServerPort);
|
||||
exec();
|
||||
} else {
|
||||
// setup a shutdown event listener to handle SIGTERM or WM_CLOSE for us
|
||||
AssignmentClient client(requestAssignmentType, assignmentPool,
|
||||
walletUUID, assignmentServerHostname, assignmentServerPort);
|
||||
exec();
|
||||
|
|
Loading…
Reference in a new issue