mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
Move CInputManager from singleton to CApplication member
The main reason why CInputManager was singleton is the easy access across the code. That had the negative side effect that time of destruction was at a very late stage of the shutdown and could not be controlled by us. My moving it to CApplication, the access is equally easy (using sApp) and allows to be cleaned up properly during graceful shutdown. ref T391
This commit is contained in:
committed by
Klaus Basan
parent
705a56b1cb
commit
f6ea2a9107
@@ -7,6 +7,7 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackcore/application.h"
|
||||
#include "blackcore/context/contextapplicationimpl.h"
|
||||
#include "blackcore/inputmanager.h"
|
||||
#include "blackmisc/dbusserver.h"
|
||||
@@ -161,7 +162,7 @@ namespace BlackCore
|
||||
{
|
||||
m_registeredApplications.push_back(identifier);
|
||||
emit this->registrationChanged();
|
||||
emit this->hotkeyActionsRegistered(CInputManager::instance()->allAvailableActions(), {});
|
||||
emit this->hotkeyActionsRegistered(sApp->getInputManager()->allAvailableActions(), {});
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user