mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 18:23:22 +02:00
Windows-only version, without changing assignment-client/domain-server
classes.
This commit is contained in:
parent
a7d2373f3e
commit
b221232117
2 changed files with 6 additions and 7 deletions
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue