summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qevent.h
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2020-11-09 16:47:45 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2020-11-10 10:23:55 +0000
commitf95691b8afa5e73fc31ab1d654bfceb4bddb53a0 (patch)
tree311fa0972e0636850d9e1d63a1d2f2b1598d631d /src/gui/kernel/qevent.h
parent48219c8231f7f9daf79f6c60a752b78c03e44a1f (diff)
Move the remaining QSinglePointEvent ctor to protected; add source arg
QSinglePointEvent no longer has public constructors: we don't expect users to construct instances, because it's conceptually an abstract base class (even though some subclasses don't add more storage). We give it a Qt::MouseEventSource argument so that m_source won't need to be set in other subclasses. There was some hope of removing MouseEventSource completely, but it hasn't been done, for the sake of avoiding SC breaks. Change-Id: Iea2946699726fb7ac98757b7b8f1b7cfdccc1449 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/gui/kernel/qevent.h')
-rw-r--r--src/gui/kernel/qevent.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h
index 7e35a1b117..7a361591e9 100644
--- a/src/gui/kernel/qevent.h
+++ b/src/gui/kernel/qevent.h
@@ -134,11 +134,6 @@ class Q_GUI_EXPORT QSinglePointEvent : public QPointerEvent
Q_PROPERTY(QObject *exclusivePointGrabber READ exclusivePointGrabber WRITE setExclusivePointGrabber)
public:
- QSinglePointEvent(Type type, const QPointingDevice *dev, const QPointF &localPos,
- const QPointF &scenePos, const QPointF &globalPos,
- Qt::MouseButton button = Qt::NoButton, Qt::MouseButtons buttons = Qt::NoButton,
- Qt::KeyboardModifiers modifiers = Qt::NoModifier);
-
inline Qt::MouseButton button() const { return m_button; }
inline Qt::MouseButtons buttons() const { return m_mouseState; }
@@ -162,6 +157,11 @@ protected:
QSinglePointEvent(Type type, const QPointingDevice *dev, const QEventPoint &point,
Qt::MouseButton button, Qt::MouseButtons buttons,
Qt::KeyboardModifiers modifiers, Qt::MouseEventSource source);
+ QSinglePointEvent(Type type, const QPointingDevice *dev, const QPointF &localPos,
+ const QPointF &scenePos, const QPointF &globalPos,
+ Qt::MouseButton button, Qt::MouseButtons buttons,
+ Qt::KeyboardModifiers modifiers,
+ Qt::MouseEventSource source = Qt::MouseEventNotSynthesized);
Qt::MouseButton m_button = Qt::NoButton;
Qt::MouseButtons m_mouseState = Qt::NoButton;