diff options
author | Ivan Solovev <ivan.solovev@qt.io> | 2022-07-11 17:01:42 +0200 |
---|---|---|
committer | Ivan Solovev <ivan.solovev@qt.io> | 2022-07-12 20:43:03 +0200 |
commit | 12535b0c03bb4e5f4a8682623b0366d4d65b9b54 (patch) | |
tree | 7ea54eca5f38af3954bab6157fd188884bf54ac5 | |
parent | c0a5f17679b2803c6a6bf0b01367fd53c9c83a48 (diff) |
QtBase: #ifdef out definitions of deprecated methods
Some of the deprecated methods didn't have their definitions guarded by
if QT_DEPRECATED_SINCE(MAJ, MIN)
This patch fixes such cases over all QtBase.
Task-number: QTBUG-104857
Pick-to: 6.4 6.3 6.2
Change-Id: I0106128f3a35a30c9f2949819f39076e773559e7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
-rw-r--r-- | src/gui/kernel/qevent.cpp | 2 | ||||
-rw-r--r-- | src/gui/kernel/qeventpoint.cpp | 3 | ||||
-rw-r--r-- | src/gui/kernel/qpointingdevice.cpp | 2 | ||||
-rw-r--r-- | src/gui/kernel/qsurfaceformat.cpp | 3 |
4 files changed, 9 insertions, 1 deletions
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index 59702ae4b0..b1ad2753fe 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -4430,6 +4430,7 @@ QTouchEvent::QTouchEvent(QEvent::Type eventType, } } +#if QT_DEPRECATED_SINCE(6, 0) /*! \deprecated [6.0] Use another constructor. @@ -4449,6 +4450,7 @@ QTouchEvent::QTouchEvent(QEvent::Type eventType, for (QEventPoint &point : m_points) QMutableEventPoint::setDevice(point, device); } +#endif // QT_DEPRECATED_SINCE(6, 0) Q_IMPL_EVENT_COMMON(QTouchEvent) diff --git a/src/gui/kernel/qeventpoint.cpp b/src/gui/kernel/qeventpoint.cpp index 4030ebce0c..922550ca47 100644 --- a/src/gui/kernel/qeventpoint.cpp +++ b/src/gui/kernel/qeventpoint.cpp @@ -430,6 +430,7 @@ QPointF QEventPoint::normalizedPosition() const return (globalPosition() - geom.topLeft()) / geom.width(); } +#if QT_DEPRECATED_SINCE(6, 0) /*! \deprecated [6.0] Use globalPressPosition() instead. @@ -467,7 +468,7 @@ QPointF QEventPoint::lastNormalizedPos() const return QPointF(); return (globalLastPosition() - geom.topLeft()) / geom.width(); } - +#endif // QT_DEPRECATED_SINCE(6, 0) /*! \internal This class is explicitly shared, which means if you construct an event and diff --git a/src/gui/kernel/qpointingdevice.cpp b/src/gui/kernel/qpointingdevice.cpp index e84ba32f4a..d9ce0b0cf9 100644 --- a/src/gui/kernel/qpointingdevice.cpp +++ b/src/gui/kernel/qpointingdevice.cpp @@ -145,6 +145,7 @@ QPointingDevice::QPointingDevice(QPointingDevicePrivate &d, QObject *parent) { } +#if QT_DEPRECATED_SINCE(6, 0) /*! \internal \deprecated [6.0] Please use the constructor rather than setters. @@ -195,6 +196,7 @@ void QPointingDevice::setMaximumTouchPoints(int c) Q_D(QPointingDevice); d->maximumTouchPoints = c; } +#endif // QT_DEPRECATED_SINCE(6, 0) /*! Returns the pointer type. diff --git a/src/gui/kernel/qsurfaceformat.cpp b/src/gui/kernel/qsurfaceformat.cpp index 9227b47907..cc2bbea551 100644 --- a/src/gui/kernel/qsurfaceformat.cpp +++ b/src/gui/kernel/qsurfaceformat.cpp @@ -717,8 +717,10 @@ void QSurfaceFormat::setColorSpace(const QColorSpace &colorSpace) } } +#if QT_DEPRECATED_SINCE(6, 0) /*! \overload + \deprecated [6.0] Use setColorSpace(QColorSpace) instead. Sets the colorspace to one of the predefined values. @@ -737,6 +739,7 @@ void QSurfaceFormat::setColorSpace(ColorSpace colorSpace) break; } } +#endif // QT_DEPRECATED_SINCE(6, 0) /*! \return the color space. |