summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2021-08-27 16:15:28 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-08-27 18:31:30 +0000
commitf906f1d1ce398e380697d22458198bc1514ccf56 (patch)
treefad2229224c0a517f9a734b72197ee76aef64a82
parent626418ad136e58af01599c17ef999f367f5c0619 (diff)
Fix deprecation of QMouseEvent::source() and flags()
Amends 53496e67f0b78645c6080e9218c7a36bc5a9d76d: - move flags() out of the QT_DEPRECATED_SINCE block in the header - add QT_DEPRECATED_SINCE block around source() implementation Change-Id: Id52fa6b04a13efbede3e6ac440060f90b283e773 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit ba8f9d8d92ba4fd9aaf6e0885b56b56e25acfc45) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/gui/kernel/qevent.cpp2
-rw-r--r--src/gui/kernel/qevent.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index 5e3eccd833..c2e76b4fa6 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 3f8b53262f..51e00dff1c 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