mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-22 13:15:39 +08:00
Convert private slots to private functions
This commit is contained in:
committed by
Klaus Basan
parent
2856dad280
commit
b6180d33af
@@ -29,8 +29,8 @@ namespace BlackCore
|
|||||||
m_keyboard(IKeyboard::create(this)),
|
m_keyboard(IKeyboard::create(this)),
|
||||||
m_joystick(IJoystick::create(this))
|
m_joystick(IJoystick::create(this))
|
||||||
{
|
{
|
||||||
connect(m_keyboard.get(), &IKeyboard::keyCombinationChanged, this, &CInputManager::ps_processKeyCombinationChanged, Qt::QueuedConnection);
|
connect(m_keyboard.get(), &IKeyboard::keyCombinationChanged, this, &CInputManager::processKeyCombinationChanged, Qt::QueuedConnection);
|
||||||
connect(m_joystick.get(), &IJoystick::buttonCombinationChanged, this, &CInputManager::ps_processButtonCombinationChanged, Qt::QueuedConnection);
|
connect(m_joystick.get(), &IJoystick::buttonCombinationChanged, this, &CInputManager::processButtonCombinationChanged, Qt::QueuedConnection);
|
||||||
reloadHotkeySettings();
|
reloadHotkeySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ namespace BlackCore
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CInputManager::ps_processKeyCombinationChanged(const CHotkeyCombination &combination)
|
void CInputManager::processKeyCombinationChanged(const CHotkeyCombination &combination)
|
||||||
{
|
{
|
||||||
// Merge in the joystick part
|
// Merge in the joystick part
|
||||||
CHotkeyCombination copy(combination);
|
CHotkeyCombination copy(combination);
|
||||||
@@ -91,7 +91,7 @@ namespace BlackCore
|
|||||||
processCombination(copy);
|
processCombination(copy);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CInputManager::ps_processButtonCombinationChanged(const CHotkeyCombination &combination)
|
void CInputManager::processButtonCombinationChanged(const CHotkeyCombination &combination)
|
||||||
{
|
{
|
||||||
// Merge in the keyboard keys
|
// Merge in the keyboard keys
|
||||||
CHotkeyCombination copy(combination);
|
CHotkeyCombination copy(combination);
|
||||||
|
|||||||
@@ -107,9 +107,7 @@ namespace BlackCore
|
|||||||
//! Constructor
|
//! Constructor
|
||||||
CInputManager(QObject *parent = nullptr);
|
CInputManager(QObject *parent = nullptr);
|
||||||
|
|
||||||
private slots:
|
|
||||||
void ps_processKeyCombinationChanged(const BlackMisc::Input::CHotkeyCombination &combination);
|
|
||||||
void ps_processButtonCombinationChanged(const BlackMisc::Input::CHotkeyCombination &combination);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
//! Handle to a bound action
|
//! Handle to a bound action
|
||||||
@@ -125,6 +123,9 @@ namespace BlackCore
|
|||||||
//! Reload hotkey settings
|
//! Reload hotkey settings
|
||||||
void reloadHotkeySettings();
|
void reloadHotkeySettings();
|
||||||
|
|
||||||
|
void processKeyCombinationChanged(const BlackMisc::Input::CHotkeyCombination &combination);
|
||||||
|
void processButtonCombinationChanged(const BlackMisc::Input::CHotkeyCombination &combination);
|
||||||
|
|
||||||
//! Bind action
|
//! Bind action
|
||||||
int bindImpl(const QString &action, QObject *receiver, std::function<void(bool)> function);
|
int bindImpl(const QString &action, QObject *receiver, std::function<void(bool)> function);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user