Windows-only version, without changing assignment-client/domain-server

classes.
This commit is contained in:
howard-stearns 2016-04-20 10:31:26 -07:00
parent a7d2373f3e
commit b221232117
2 changed files with 6 additions and 7 deletions

View file

@ -366,6 +366,12 @@ public:
return true;
}
}
if (message->message == WM_CLOSE) {
// tell our registered application to quit
QMetaObject::invokeMethod(qApp, "quit");
return true; // Don't zombify the application by OS-exitting. Let the application quit in the normal quit-signal way.
}
}
return false;
}
@ -718,12 +724,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) :
connect(addressManager.data(), &AddressManager::hostChanged, this, &Application::updateWindowTitle);
connect(this, &QCoreApplication::aboutToQuit, addressManager.data(), &AddressManager::storeCurrentAddress);
// setup a shutdown event listener to handle SIGTERM or WM_CLOSE for us
#ifdef _WIN32
installNativeEventFilter(&ShutdownEventListener::getInstance());
#else
ShutdownEventListener::getInstance();
#endif
// Save avatar location immediately after a teleport.
connect(getMyAvatar(), &MyAvatar::positionGoneTo,

View file

@ -47,7 +47,6 @@ bool ShutdownEventListener::nativeEventFilter(const QByteArray &eventType, void*
if (message->message == WM_CLOSE) {
// tell our registered application to quit
QMetaObject::invokeMethod(qApp, "quit");
return true; // Don't zombify the application by OS-exitting. Let the application quit in the normal quit-signal way.
}
}
#endif