mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 21:15:33 +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
@@ -30,12 +30,6 @@ namespace BlackCore
|
||||
reloadHotkeySettings();
|
||||
}
|
||||
|
||||
CInputManager *CInputManager::instance()
|
||||
{
|
||||
static CInputManager instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
void CInputManager::registerAction(const QString &action, const QPixmap &icon)
|
||||
{
|
||||
if (!m_availableActions.contains(action))
|
||||
|
||||
Reference in New Issue
Block a user