mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 22:16:58 +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;
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -718,12 +724,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) :
|
||||||
|
|
||||||
connect(addressManager.data(), &AddressManager::hostChanged, this, &Application::updateWindowTitle);
|
connect(addressManager.data(), &AddressManager::hostChanged, this, &Application::updateWindowTitle);
|
||||||
connect(this, &QCoreApplication::aboutToQuit, addressManager.data(), &AddressManager::storeCurrentAddress);
|
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.
|
// Save avatar location immediately after a teleport.
|
||||||
connect(getMyAvatar(), &MyAvatar::positionGoneTo,
|
connect(getMyAvatar(), &MyAvatar::positionGoneTo,
|
||||||
|
|
|
@ -47,7 +47,6 @@ bool ShutdownEventListener::nativeEventFilter(const QByteArray &eventType, void*
|
||||||
if (message->message == WM_CLOSE) {
|
if (message->message == WM_CLOSE) {
|
||||||
// tell our registered application to quit
|
// tell our registered application to quit
|
||||||
QMetaObject::invokeMethod(qApp, "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
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue