aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2016-12-01 13:05:26 +0100
committerSimon Hausmann <simon.hausmann@qt.io>2016-12-09 07:37:57 +0000
commitc66e69efa0b95b3c0220a4ec7e1f6ea72c8a160b (patch)
tree9a5a3bff6c289d89976db1b2484e5e949d6b19a5
parent2d6070355ca690e096f7740f7409d3e6e0a44b68 (diff)
change type of QQuickPointerDevice::uniqueId to QPointingDeviceUniqueId
This will make it easier to change or extend further, in case some future device has some sort of unique serial number which does not fit in a quint64. Task-number: QTBUG-54616 Change-Id: I8f20b13d75b937fce6a66653476d0d25f2abf34b Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
-rw-r--r--src/quick/items/qquickevents_p_p.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/quick/items/qquickevents_p_p.h b/src/quick/items/qquickevents_p_p.h
index d25b61d62e..7b281623fe 100644
--- a/src/quick/items/qquickevents_p_p.h
+++ b/src/quick/items/qquickevents_p_p.h
@@ -450,7 +450,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickPointerDevice : public QObject
Q_PROPERTY(int maximumTouchPoints READ maximumTouchPoints CONSTANT)
Q_PROPERTY(int buttonCount READ buttonCount CONSTANT)
Q_PROPERTY(QString name READ name CONSTANT)
- Q_PROPERTY(qint64 uniqueId READ uniqueId CONSTANT)
+ Q_PROPERTY(QPointingDeviceUniqueId uniqueId READ uniqueId CONSTANT)
public:
enum DeviceType {
@@ -497,7 +497,8 @@ public:
QQuickPointerDevice(DeviceType devType, PointerType pType, Capabilities caps, int maxPoints, int buttonCount, const QString &name, qint64 uniqueId = 0)
: m_deviceType(devType), m_pointerType(pType), m_capabilities(caps)
- , m_maximumTouchPoints(maxPoints), m_buttonCount(buttonCount), m_name(name), m_uniqueId(uniqueId), m_event(nullptr)
+ , m_maximumTouchPoints(maxPoints), m_buttonCount(buttonCount), m_name(name)
+ , m_uniqueId(QPointingDeviceUniqueId::fromNumericId(uniqueId)), m_event(nullptr)
{
if (m_deviceType == Mouse) {
m_event = new QQuickPointerMouseEvent;
@@ -516,7 +517,7 @@ public:
int maximumTouchPoints() const { return m_maximumTouchPoints; }
int buttonCount() const { return m_buttonCount; }
QString name() const { return m_name; }
- qint64 uniqueId() const { return m_uniqueId; }
+ QPointingDeviceUniqueId uniqueId() const { return m_uniqueId; }
QQuickPointerEvent *pointerEvent() const { return m_event; }
static QQuickPointerDevice *touchDevice(QTouchDevice *d);
@@ -531,7 +532,7 @@ private:
int m_maximumTouchPoints;
int m_buttonCount;
QString m_name;
- qint64 m_uniqueId;
+ QPointingDeviceUniqueId m_uniqueId;
// the device-specific event instance which is reused during event delivery
QQuickPointerEvent *m_event;