mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 08:36:52 +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
@@ -38,6 +38,9 @@ namespace BlackCore
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
//! Constructor
|
||||
CInputManager(QObject *parent = nullptr);
|
||||
|
||||
//! Register new action
|
||||
void registerAction(const QString &action, const QPixmap &icon = BlackMisc::CIcons::empty16());
|
||||
|
||||
@@ -93,9 +96,6 @@ namespace BlackCore
|
||||
//! Releases all devices
|
||||
void releaseDevices();
|
||||
|
||||
//! Creates a native keyboard handler object
|
||||
static CInputManager *instance();
|
||||
|
||||
signals:
|
||||
//! Event hotkeyfunction occured
|
||||
void remoteActionFromLocal(const QString &action, bool argument);
|
||||
@@ -109,12 +109,6 @@ namespace BlackCore
|
||||
//! New hotkey action is registered
|
||||
void hotkeyActionRegistered(const QStringList &actions);
|
||||
|
||||
protected:
|
||||
//! Constructor
|
||||
CInputManager(QObject *parent = nullptr);
|
||||
|
||||
|
||||
|
||||
private:
|
||||
//! Handle to a bound action
|
||||
struct BindInfo
|
||||
|
||||
Reference in New Issue
Block a user