mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
Replace qint32 with int
This commit is contained in:
committed by
Mathew Sutcliffe
parent
3e8b9dc0c9
commit
e4ef6e4058
@@ -16,11 +16,11 @@ namespace BlackMisc
|
||||
{
|
||||
namespace Hardware
|
||||
{
|
||||
CJoystickButton::CJoystickButton(qint32 buttonIndex) :
|
||||
CJoystickButton::CJoystickButton(int buttonIndex) :
|
||||
m_buttonIndex(buttonIndex)
|
||||
{}
|
||||
|
||||
void CJoystickButton::setButtonIndex(qint32 buttonIndex)
|
||||
void CJoystickButton::setButtonIndex(int buttonIndex)
|
||||
{
|
||||
m_buttonIndex = buttonIndex;
|
||||
}
|
||||
|
||||
@@ -37,16 +37,16 @@ namespace BlackMisc
|
||||
CJoystickButton() = default;
|
||||
|
||||
//! Constructor
|
||||
CJoystickButton(qint32 buttonIndex);
|
||||
CJoystickButton(int buttonIndex);
|
||||
|
||||
//! Get button index
|
||||
qint32 getButtonIndex() const { return m_buttonIndex; }
|
||||
int getButtonIndex() const { return m_buttonIndex; }
|
||||
|
||||
//! Get button as String
|
||||
QString getButtonAsString() const { return buttonIndexToString(m_buttonIndex); }
|
||||
|
||||
//! Set button index
|
||||
void setButtonIndex(qint32 buttonIndex);
|
||||
void setButtonIndex(int buttonIndex);
|
||||
|
||||
//! Is valid?
|
||||
bool isValid() const { return m_buttonIndex >= 0 ? true : false; }
|
||||
@@ -74,9 +74,9 @@ namespace BlackMisc
|
||||
|
||||
private:
|
||||
BLACK_ENABLE_TUPLE_CONVERSION(CJoystickButton)
|
||||
qint32 m_buttonIndex = m_invalidIndex; //!< code similar to Qt::Key
|
||||
int m_buttonIndex = m_invalidIndex; //!< code similar to Qt::Key
|
||||
|
||||
static const qint32 m_invalidIndex = -1;
|
||||
static const int m_invalidIndex = -1;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user