diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index ff9ec52b092..fd3f55bd9cf 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -804,10 +804,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 9c53f7ce925..1c9643fa982 100644 --- a/src/gui/kernel/qevent.h +++ b/src/gui/kernel/qevent.h @@ -273,8 +273,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