From eaef6cfbcbee02b45a8401fe49cb1972f6b3d343 Mon Sep 17 00:00:00 2001 From: Eike Hein Date: Wed, 11 Sep 2013 19:01:17 +0200 Subject: [PATCH] Make KDeclarativeMouseEvent's button prop usable in QML. Qt::MouseButton is not registered, so use int instead. This matches QML's own MouseEvent.button property. Ack'ed by Marco Martin. --- src/declarativeimports/qtextracomponents/mouseeventlistener.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/declarativeimports/qtextracomponents/mouseeventlistener.h b/src/declarativeimports/qtextracomponents/mouseeventlistener.h index 6d34fdc67..ec8a22e89 100644 --- a/src/declarativeimports/qtextracomponents/mouseeventlistener.h +++ b/src/declarativeimports/qtextracomponents/mouseeventlistener.h @@ -30,7 +30,7 @@ class KDeclarativeMouseEvent : public QObject Q_PROPERTY(int y READ y) Q_PROPERTY(int screenX READ screenX) Q_PROPERTY(int screenY READ screenY) - Q_PROPERTY(Qt::MouseButton button READ button) + Q_PROPERTY(int button READ button) Q_PROPERTY(Qt::MouseButtons buttons READ buttons) Q_PROPERTY(Qt::KeyboardModifiers modifiers READ modifiers) @@ -52,7 +52,7 @@ public: int y() const { return m_y; } int screenX() const { return m_screenX; } int screenY() const { return m_screenY; } - Qt::MouseButton button() const { return m_button; } + int button() const { return m_button; } Qt::MouseButtons buttons() const { return m_buttons; } Qt::KeyboardModifiers modifiers() const { return m_modifiers; }