mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 07:35:48 +08:00
refs #313 Fix argument by const reference
This commit is contained in:
@@ -57,7 +57,7 @@ namespace BlackInput
|
||||
* \param key
|
||||
* \param isPressed
|
||||
*/
|
||||
virtual void triggerKey(const BlackMisc::Hardware::CKeyboardKey key, bool isPressed) = 0;
|
||||
virtual void triggerKey(const BlackMisc::Hardware::CKeyboardKey &key, bool isPressed) = 0;
|
||||
|
||||
//! Creates a native keyboard handler object
|
||||
static IKeyboard *getInstance();
|
||||
|
||||
@@ -50,6 +50,7 @@ namespace BlackInput
|
||||
m_pressedKey.setKeyObject(CKeyboardKey());
|
||||
}
|
||||
|
||||
void CKeyboardLinux::triggerKey(const CKeyboardKey &key, bool isPressed)
|
||||
{
|
||||
if(!isPressed) emit keyUp(key);
|
||||
else emit keyDown(key);
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace BlackInput
|
||||
virtual void startCapture(bool ignoreNextKey = false) override;
|
||||
|
||||
//! \copydoc IKeyboard::triggerKey()
|
||||
virtual void triggerKey(const BlackMisc::Hardware::CKeyboardKey key, bool isPressed) override;
|
||||
virtual void triggerKey(const BlackMisc::Hardware::CKeyboardKey &key, bool isPressed) override;
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ namespace BlackInput
|
||||
m_pressedKey.setKeyObject(CKeyboardKey());
|
||||
}
|
||||
|
||||
void CKeyboardMac::triggerKey(const CKeyboardKey &key, bool isPressed)
|
||||
{
|
||||
if(!isPressed) emit keyUp(key);
|
||||
else emit keyDown(key);
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace BlackInput
|
||||
virtual void startCapture(bool ignoreNextKey = false) override;
|
||||
|
||||
//! \copydoc IKeyboard::triggerKey()
|
||||
virtual void triggerKey(const BlackMisc::Hardware::CKeyboardKey key, bool isPressed) override;
|
||||
virtual void triggerKey(const BlackMisc::Hardware::CKeyboardKey &key, bool isPressed) override;
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace BlackInput
|
||||
m_pressedKey.setKeyObject(CKeyboardKey());
|
||||
}
|
||||
|
||||
void CKeyboardWindows::triggerKey(const CKeyboardKey key, bool isPressed)
|
||||
void CKeyboardWindows::triggerKey(const CKeyboardKey &key, bool isPressed)
|
||||
{
|
||||
if(!isPressed) emit keyUp(key);
|
||||
else emit keyDown(key);
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace BlackInput
|
||||
virtual void startCapture(bool ignoreNextKey = false) override;
|
||||
|
||||
//! \copydoc IKeyboard::triggerKey()
|
||||
virtual void triggerKey(const BlackMisc::Hardware::CKeyboardKey key, bool isPressed) override;
|
||||
virtual void triggerKey(const BlackMisc::Hardware::CKeyboardKey &key, bool isPressed) override;
|
||||
|
||||
//! \brief Keyboard hook handle
|
||||
HHOOK keyboardHook() const { return m_keyboardHook; }
|
||||
|
||||
Reference in New Issue
Block a user