mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-30 22:29:13 +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
|
namespace Hardware
|
||||||
{
|
{
|
||||||
CJoystickButton::CJoystickButton(qint32 buttonIndex) :
|
CJoystickButton::CJoystickButton(int buttonIndex) :
|
||||||
m_buttonIndex(buttonIndex)
|
m_buttonIndex(buttonIndex)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
void CJoystickButton::setButtonIndex(qint32 buttonIndex)
|
void CJoystickButton::setButtonIndex(int buttonIndex)
|
||||||
{
|
{
|
||||||
m_buttonIndex = buttonIndex;
|
m_buttonIndex = buttonIndex;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,16 +37,16 @@ namespace BlackMisc
|
|||||||
CJoystickButton() = default;
|
CJoystickButton() = default;
|
||||||
|
|
||||||
//! Constructor
|
//! Constructor
|
||||||
CJoystickButton(qint32 buttonIndex);
|
CJoystickButton(int buttonIndex);
|
||||||
|
|
||||||
//! Get button index
|
//! Get button index
|
||||||
qint32 getButtonIndex() const { return m_buttonIndex; }
|
int getButtonIndex() const { return m_buttonIndex; }
|
||||||
|
|
||||||
//! Get button as String
|
//! Get button as String
|
||||||
QString getButtonAsString() const { return buttonIndexToString(m_buttonIndex); }
|
QString getButtonAsString() const { return buttonIndexToString(m_buttonIndex); }
|
||||||
|
|
||||||
//! Set button index
|
//! Set button index
|
||||||
void setButtonIndex(qint32 buttonIndex);
|
void setButtonIndex(int buttonIndex);
|
||||||
|
|
||||||
//! Is valid?
|
//! Is valid?
|
||||||
bool isValid() const { return m_buttonIndex >= 0 ? true : false; }
|
bool isValid() const { return m_buttonIndex >= 0 ? true : false; }
|
||||||
@@ -74,9 +74,9 @@ namespace BlackMisc
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
BLACK_ENABLE_TUPLE_CONVERSION(CJoystickButton)
|
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