aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickmousearea_p.h
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2012-07-10 16:40:06 +1000
committerQt by Nokia <qt-info@nokia.com>2012-07-11 17:37:55 +0200
commitdd0caf5ad611311621696177adcaf87c33f88a03 (patch)
treeebc46c8e894a68a6a1fb9e9a6a9ba9da81e48f3e /src/quick/items/qquickmousearea_p.h
parentb5eb3d69b40c4b750a1bbece7be2acbe7cf918e3 (diff)
pressed and pressedButtons don't work when multiple buttons are pressed
The pressed property would react to any mouse event, regardless of whether it was in acceptedButtons, or there were other buttons still pressed. It will now remain true while any button in acceptedButtons is pressed. The pressedButtons property could contain buttons not in the acceptedButtons mask. It will now only contain buttons that are in the acceptedButtons mask. Task-number: QTBUG-26458 Change-Id: I6b25cc36a58c113de062d530761dc179d7ef4a5a Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Diffstat (limited to 'src/quick/items/qquickmousearea_p.h')
-rw-r--r--src/quick/items/qquickmousearea_p.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/quick/items/qquickmousearea_p.h b/src/quick/items/qquickmousearea_p.h
index 14b74f45d0..8a8de3bdc3 100644
--- a/src/quick/items/qquickmousearea_p.h
+++ b/src/quick/items/qquickmousearea_p.h
@@ -135,7 +135,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickMouseArea : public QQuickItem
Q_PROPERTY(bool containsMouse READ hovered NOTIFY hoveredChanged)
Q_PROPERTY(bool pressed READ pressed NOTIFY pressedChanged)
Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged)
- Q_PROPERTY(Qt::MouseButtons pressedButtons READ pressedButtons NOTIFY pressedChanged)
+ Q_PROPERTY(Qt::MouseButtons pressedButtons READ pressedButtons NOTIFY pressedButtonsChanged)
Q_PROPERTY(Qt::MouseButtons acceptedButtons READ acceptedButtons WRITE setAcceptedButtons NOTIFY acceptedButtonsChanged)
Q_PROPERTY(bool hoverEnabled READ hoverEnabled WRITE setHoverEnabled NOTIFY hoverEnabledChanged)
#ifndef QT_NO_DRAGANDDROP
@@ -187,6 +187,7 @@ Q_SIGNALS:
void hoveredChanged();
void pressedChanged();
void enabledChanged();
+ void pressedButtonsChanged();
void acceptedButtonsChanged();
void hoverEnabledChanged();
#ifndef QT_NO_CURSOR
@@ -210,7 +211,7 @@ Q_SIGNALS:
protected:
void setHovered(bool);
- bool setPressed(bool);
+ bool setPressed(Qt::MouseButton button, bool);
bool sendMouseEvent(QMouseEvent *event);
virtual void mousePressEvent(QMouseEvent *event);