diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index c7c3953ce7..82d04d3a56 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -743,6 +743,7 @@ QMouseEvent::QMouseEvent(QEvent::Type type, const QPointF &localPos, const QPoin Q_IMPL_EVENT_COMMON(QMouseEvent) /*! + \fn Qt::MouseEventSource QMouseEvent::source() const \since 5.3 \deprecated [6.0] Use pointingDevice() instead. @@ -771,12 +772,13 @@ Q_IMPL_EVENT_COMMON(QMouseEvent) decide how to react to this event. But it's even better to react to the original event rather than handling only mouse events. */ -#if QT_DEPRECATED_SINCE(6, 0) +// Note: the docs mention 6.0 as a deprecation version. That is correct and +// intended, because we want our users to stop using it! Internally we will +// deprecate it when we port our code away from using it. 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 7bca2b2931..ab8a341d26 100644 --- a/src/gui/kernel/qevent.h +++ b/src/gui/kernel/qevent.h @@ -233,8 +233,8 @@ public: QPointF windowPos() const { return scenePosition(); } QT_DEPRECATED_VERSION_X_6_0("Use globalPosition()") QPointF screenPos() const { return globalPosition(); } - Qt::MouseEventSource source() const; #endif // QT_DEPRECATED_SINCE(6, 0) + Qt::MouseEventSource source() const; Qt::MouseEventFlags flags() const; };