From 2d6070355ca690e096f7740f7409d3e6e0a44b68 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Thu, 1 Dec 2016 13:02:34 +0100 Subject: rename QPointerUniqueId -> QPointingDeviceUniqueId MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Several people agreed that the name was confusing and that this one is better. Task-number: QTBUG-54616 Change-Id: Ie9d24fc6e233949be36c8b6ee2650080a8a3506e Reviewed-by: Sune Vuorela Reviewed-by: Jan Arve Sæther --- src/quick/items/qquickevents_p_p.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/quick/items/qquickevents_p_p.h') diff --git a/src/quick/items/qquickevents_p_p.h b/src/quick/items/qquickevents_p_p.h index 6179791413..d25b61d62e 100644 --- a/src/quick/items/qquickevents_p_p.h +++ b/src/quick/items/qquickevents_p_p.h @@ -302,8 +302,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickEventTouchPoint : public QQuickEventPoint Q_OBJECT Q_PROPERTY(qreal rotation READ rotation) Q_PROPERTY(qreal pressure READ pressure) -// TODO rename to QPointingDeviceUniqueId -// Q_PROPERTY(QPointerUniqueId uniqueId READ uniqueId) + Q_PROPERTY(QPointingDeviceUniqueId uniqueId READ uniqueId) public: QQuickEventTouchPoint(QQuickPointerTouchEvent *parent); @@ -312,12 +311,12 @@ public: qreal rotation() const { return m_rotation; } qreal pressure() const { return m_pressure; } -// QPointerUniqueId uniqueId() const { return m_uniqueId; } + QPointingDeviceUniqueId uniqueId() const { return m_uniqueId; } private: qreal m_rotation; qreal m_pressure; -// QPointerUniqueId m_uniqueId; + QPointingDeviceUniqueId m_uniqueId; Q_DISABLE_COPY(QQuickEventTouchPoint) }; @@ -555,7 +554,7 @@ QML_DECLARE_TYPE(QQuickMouseEvent) QML_DECLARE_TYPE(QQuickWheelEvent) QML_DECLARE_TYPE(QQuickCloseEvent) QML_DECLARE_TYPE(QQuickPointerDevice) -//QML_DECLARE_TYPE(QPointerUniqueId) +QML_DECLARE_TYPE(QPointingDeviceUniqueId) QML_DECLARE_TYPE(QQuickPointerEvent) #endif // QQUICKEVENTS_P_P_H -- cgit v1.2.3 From c66e69efa0b95b3c0220a4ec7e1f6ea72c8a160b Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Thu, 1 Dec 2016 13:05:26 +0100 Subject: change type of QQuickPointerDevice::uniqueId to QPointingDeviceUniqueId MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/quick/items/qquickevents_p_p.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/quick/items/qquickevents_p_p.h') 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; -- cgit v1.2.3