diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index 5e3eccd8336..c2e76b4fa66 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -803,10 +803,12 @@ QMouseEvent::~QMouseEvent() \sa Qt::MouseEventSource \sa QGraphicsSceneMouseEvent::source() */ +#if QT_DEPRECATED_SINCE(6, 0) Qt::MouseEventSource QMouseEvent::source() const { return Qt::MouseEventSource(m_source); } +#endif /*! \since 5.3 diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h index 3f8b53262f0..51e00dff1c6 100644 --- a/src/gui/kernel/qevent.h +++ b/src/gui/kernel/qevent.h @@ -272,8 +272,8 @@ public: QT_DEPRECATED_VERSION_X_6_0("Use globalPosition()") QPointF screenPos() const { return globalPosition(); } Qt::MouseEventSource source() const; - Qt::MouseEventFlags flags() const; #endif // QT_DEPRECATED_SINCE(6, 0) + Qt::MouseEventFlags flags() const; }; class Q_GUI_EXPORT QHoverEvent : public QSinglePointEvent