From f95691b8afa5e73fc31ab1d654bfceb4bddb53a0 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Mon, 9 Nov 2020 16:47:45 +0100 Subject: 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 --- src/gui/kernel/qevent.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/gui/kernel/qevent.h') 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; -- cgit v1.2.3