diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index edb602407ae..2f7d5c56c61 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -2368,52 +2368,6 @@ QTabletEvent::QTabletEvent(Type type, const QPointF &pos, const QPointF &globalP { } -#if QT_DEPRECATED_SINCE(5, 15) -/*! - Construct a tablet event of the given \a type. - - The \a pos parameter indicates where the event occurred in the - widget; \a globalPos is the corresponding position in absolute - coordinates. - - \a pressure contains the pressure exerted on the \a device. - - \a pointerType describes the type of pen that is being used. - - \a xTilt and \a yTilt contain the device's degree of tilt from the - x and y axes respectively. - - \a keyState specifies which keyboard modifiers are pressed (e.g., - \uicontrol{Ctrl}). - - The \a uniqueID parameter contains the unique ID for the current device. - - The \a z parameter contains the coordinate of the device on the tablet, this - is usually given by a wheel on 4D mouse. If the device does not support a - Z-axis, pass zero here. - - The \a tangentialPressure parameter contins the tangential pressure of an air - brush. If the device does not support tangential pressure, pass 0 here. - - \a rotation contains the device's rotation in degrees. 4D mice support - rotation. If the device does not support rotation, pass 0 here. - - \sa pos(), globalPos(), device(), pressure(), xTilt(), yTilt(), uniqueId(), rotation(), - tangentialPressure(), z() - - \deprecated in 5.4: use the constructor with MouseButton status -*/ - -QTabletEvent::QTabletEvent(Type type, const QPointF &pos, const QPointF &globalPos, - int device, int pointerType, - qreal pressure, int xTilt, int yTilt, qreal tangentialPressure, - qreal rotation, int z, Qt::KeyboardModifiers keyState, qint64 uniqueID) - : QTabletEvent(type, pos, globalPos, device, pointerType, pressure, xTilt, yTilt, - tangentialPressure, rotation, z, keyState, uniqueID, Qt::NoButton, Qt::NoButton) -{ -} -#endif - /*! \internal */ @@ -2450,12 +2404,6 @@ Qt::MouseButtons QTabletEvent::buttons() const return static_cast(mExtra)->buttonState; } -/*! - \fn TabletDevices QTabletEvent::device() const - - \deprecated Use deviceType(). -*/ - /*! \fn TabletDevices QTabletEvent::deviceType() const @@ -2584,7 +2532,7 @@ Qt::MouseButtons QTabletEvent::buttons() const Returns the global x position of the mouse pointer at the time of the event. - \sa globalY(), globalPos(), hiResGlobalX() + \sa globalY(), globalPos() */ /*! @@ -2593,7 +2541,7 @@ Qt::MouseButtons QTabletEvent::buttons() const Returns the global y position of the tablet device at the time of the event. - \sa globalX(), globalPos(), hiResGlobalY() + \sa globalX(), globalPos() */ /*! @@ -2619,22 +2567,6 @@ Qt::MouseButtons QTabletEvent::buttons() const \sa pointerType() */ -/*! - \fn qreal &QTabletEvent::hiResGlobalX() const - - The high precision x position of the tablet device. - - \obsolete use globalPosF() -*/ - -/*! - \fn qreal &QTabletEvent::hiResGlobalY() const - - The high precision y position of the tablet device. - - \obsolete use globalPosF() -*/ - /*! \fn const QPointF &QTabletEvent::posF() const @@ -5018,9 +4950,8 @@ void QTouchEvent::TouchPoint::setFlags(InfoFlags flags) The \a startPos is the position of a touch or mouse event that started the scrolling. */ QScrollPrepareEvent::QScrollPrepareEvent(const QPointF &startPos) - : QEvent(QEvent::ScrollPrepare), m_target(nullptr), m_startPos(startPos) + : QEvent(QEvent::ScrollPrepare), m_startPos(startPos) { - Q_UNUSED(m_target); } /*! diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h index 87ec8e7beed..7d2d6dbdccb 100644 --- a/src/gui/kernel/qevent.h +++ b/src/gui/kernel/qevent.h @@ -41,31 +41,31 @@ #define QEVENT_H #include -#include -#include + +#include +#include #include #include +#include +#include +#include +#include +#include +#include + #if QT_CONFIG(shortcut) # include #endif -#include -#include -#include // ### Qt 6: Remove -#include -#include // ### Qt 6: Remove -#include -#include // ### Qt 6: Replace by and forward declare QFile -#include -#include // ### Qt 6: Replace by forward declaration QT_BEGIN_NAMESPACE - +class QFile; class QGuiAction; -#ifndef QT_NO_GESTURES +class QScreen; +class QTouchDevice; +#if QT_CONFIG(gestures) class QGesture; #endif -class QScreen; class Q_GUI_EXPORT QInputEvent : public QEvent { @@ -136,10 +136,6 @@ public: inline void setLocalPos(const QPointF &localPosition) { l = localPosition; } -#if QT_DEPRECATED_SINCE(5, 0) - QT_DEPRECATED inline QPointF posF() const { return l; } -#endif - Qt::MouseEventSource source() const; Qt::MouseEventFlags flags() const; @@ -281,14 +277,6 @@ public: enum PointerType { UnknownPointer, Pen, Cursor, Eraser }; Q_ENUM(PointerType) -#if QT_DEPRECATED_SINCE(5, 15) - // Actually deprecated since 5.4, in docs - QT_DEPRECATED_VERSION_X_5_15("Use the other QTabletEvent constructor") - QTabletEvent(Type t, const QPointF &pos, const QPointF &globalPos, - int device, int pointerType, qreal pressure, int xTilt, int yTilt, - qreal tangentialPressure, qreal rotation, int z, - Qt::KeyboardModifiers keyState, qint64 uniqueID); // ### remove in Qt 6 -#endif QTabletEvent(Type t, const QPointF &pos, const QPointF &globalPos, int device, int pointerType, qreal pressure, int xTilt, int yTilt, qreal tangentialPressure, qreal rotation, int z, @@ -298,9 +286,6 @@ public: inline QPoint pos() const { return mPos.toPoint(); } inline QPoint globalPos() const { return mGPos.toPoint(); } -#if QT_DEPRECATED_SINCE(5,0) - QT_DEPRECATED inline const QPointF &hiResGlobalPos() const { return mPos; } -#endif inline const QPointF &posF() const { return mPos; } inline const QPointF &globalPosF() const { return mGPos; } @@ -309,14 +294,6 @@ public: inline int y() const { return qRound(mPos.y()); } inline int globalX() const { return qRound(mGPos.x()); } inline int globalY() const { return qRound(mGPos.y()); } -#if QT_DEPRECATED_SINCE(5, 15) - QT_DEPRECATED_VERSION_X_5_15("use globalPosF().x()") - inline qreal hiResGlobalX() const { return mGPos.x(); } - QT_DEPRECATED_VERSION_X_5_15("use globalPosF().y()") - inline qreal hiResGlobalY() const { return mGPos.y(); } - QT_DEPRECATED_VERSION_X_5_15("Use deviceType()") - inline TabletDevice device() const { return TabletDevice(mDev); } -#endif inline TabletDevice deviceType() const { return TabletDevice(mDev); } inline PointerType pointerType() const { return PointerType(mPointerType); } inline qint64 uniqueId() const { return mUnique; } @@ -341,7 +318,7 @@ protected: }; #endif // QT_CONFIG(tabletevent) -#ifndef QT_NO_GESTURES +#if QT_CONFIG(gestures) class Q_GUI_EXPORT QNativeGestureEvent : public QInputEvent { public: @@ -375,7 +352,7 @@ protected: quint64 mIntValue; const QTouchDevice *mDevice; }; -#endif // QT_NO_GESTURES +#endif // QT_CONFIG(gestures) class Q_GUI_EXPORT QKeyEvent : public QInputEvent { @@ -400,22 +377,6 @@ public: inline quint32 nativeVirtualKey() const { return nVirtualKey; } inline quint32 nativeModifiers() const { return nModifiers; } - // Functions for the extended key event information -#if QT_DEPRECATED_SINCE(5, 0) - static inline QKeyEvent *createExtendedKeyEvent(Type type, int key, Qt::KeyboardModifiers modifiers, - quint32 nativeScanCode, quint32 nativeVirtualKey, - quint32 nativeModifiers, - const QString& text = QString(), bool autorep = false, - ushort count = 1) - { - return new QKeyEvent(type, key, modifiers, - nativeScanCode, nativeVirtualKey, nativeModifiers, - text, autorep, count); - } - - inline bool hasExtendedInfo() const { return true; } -#endif - protected: QString txt; int k; @@ -976,13 +937,6 @@ public: friend class QQuickMultiPointTouchArea; }; -#if QT_DEPRECATED_SINCE(5, 0) - enum DeviceType { - TouchScreen, - TouchPad - }; -#endif - explicit QTouchEvent(QEvent::Type eventType, QTouchDevice *device = nullptr, Qt::KeyboardModifiers modifiers = Qt::NoModifier, @@ -992,9 +946,6 @@ public: inline QWindow *window() const { return _window; } inline QObject *target() const { return _target; } -#if QT_DEPRECATED_SINCE(5, 0) - QT_DEPRECATED inline QTouchEvent::DeviceType deviceType() const { return static_cast(int(_device->type())); } -#endif inline Qt::TouchPointStates touchPointStates() const { return _touchPointStates; } inline const QList &touchPoints() const { return _touchPoints; } inline QTouchDevice *device() const { return _device; } @@ -1045,7 +996,6 @@ public: void setContentPos(const QPointF &pos); private: - QObject* m_target; // Qt 6 remove. QPointF m_startPos; QSizeF m_viewportSize; QRectF m_contentPosRange; diff --git a/src/gui/text/qtextdocument_p.h b/src/gui/text/qtextdocument_p.h index 95f5f89925a..17fe452a3f5 100644 --- a/src/gui/text/qtextdocument_p.h +++ b/src/gui/text/qtextdocument_p.h @@ -65,6 +65,7 @@ #include "QtGui/qtextcursor.h" #include "QtCore/qmap.h" #include "QtCore/qvariant.h" +#include "QtCore/qset.h" #include "QtCore/qurl.h" #include "private/qcssparser_p.h" diff --git a/src/platformsupport/fontdatabases/windows/qwindowsdirectwritefontdatabase.cpp b/src/platformsupport/fontdatabases/windows/qwindowsdirectwritefontdatabase.cpp index 16db2216ee4..7e94f1fcdbc 100644 --- a/src/platformsupport/fontdatabases/windows/qwindowsdirectwritefontdatabase.cpp +++ b/src/platformsupport/fontdatabases/windows/qwindowsdirectwritefontdatabase.cpp @@ -42,6 +42,7 @@ #include "qwindowsfontdatabase_p.h" #include +#include #include #include diff --git a/src/platformsupport/input/libinput/qlibinputtouch.cpp b/src/platformsupport/input/libinput/qlibinputtouch.cpp index 446218e4b3d..f00df6b6749 100644 --- a/src/platformsupport/input/libinput/qlibinputtouch.cpp +++ b/src/platformsupport/input/libinput/qlibinputtouch.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #include QT_BEGIN_NAMESPACE diff --git a/src/plugins/platforms/android/androidjniinput.cpp b/src/plugins/platforms/android/androidjniinput.cpp index 56885f2e236..ff17f218e35 100644 --- a/src/plugins/platforms/android/androidjniinput.cpp +++ b/src/plugins/platforms/android/androidjniinput.cpp @@ -45,6 +45,7 @@ #include "qandroidplatformintegration.h" #include +#include #include #include diff --git a/src/plugins/platforms/android/qandroidplatformintegration.cpp b/src/plugins/platforms/android/qandroidplatformintegration.cpp index 592b78d9362..7f9fe1f05b0 100644 --- a/src/plugins/platforms/android/qandroidplatformintegration.cpp +++ b/src/plugins/platforms/android/qandroidplatformintegration.cpp @@ -46,8 +46,9 @@ #if QT_CONFIG(opengl) #include #endif -#include #include +#include +#include #include #include diff --git a/src/plugins/platforms/cocoa/qmultitouch_mac_p.h b/src/plugins/platforms/cocoa/qmultitouch_mac_p.h index 044bcd18822..dff289f746d 100644 --- a/src/plugins/platforms/cocoa/qmultitouch_mac_p.h +++ b/src/plugins/platforms/cocoa/qmultitouch_mac_p.h @@ -58,6 +58,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp index dc98cdce4bd..f715645be32 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp @@ -43,6 +43,7 @@ #include "qeglfskmsgbmscreen.h" #include "qeglfskmsgbmdevice.h" +#include #include #include #include diff --git a/src/plugins/platforms/ios/qiosintegration.mm b/src/plugins/platforms/ios/qiosintegration.mm index d724e65717f..e7a548743ed 100644 --- a/src/plugins/platforms/ios/qiosintegration.mm +++ b/src/plugins/platforms/ios/qiosintegration.mm @@ -53,6 +53,7 @@ #include "qiosservices.h" #include "qiosoptionalplugininterface.h" +#include #include #include diff --git a/src/plugins/platforms/ios/qiosscreen.mm b/src/plugins/platforms/ios/qiosscreen.mm index 9aba658479a..b0e60d76fcf 100644 --- a/src/plugins/platforms/ios/qiosscreen.mm +++ b/src/plugins/platforms/ios/qiosscreen.mm @@ -48,6 +48,7 @@ #include +#include #include #include #include diff --git a/src/plugins/platforms/ios/quiview.mm b/src/plugins/platforms/ios/quiview.mm index 59eae073887..6254b43dc15 100644 --- a/src/plugins/platforms/ios/quiview.mm +++ b/src/plugins/platforms/ios/quiview.mm @@ -49,6 +49,7 @@ #include "qiosmenu.h" #endif +#include #include #include #include diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp index 438a0fbaa45..b8b54d9b860 100644 --- a/src/plugins/platforms/windows/qwindowscontext.cpp +++ b/src/plugins/platforms/windows/qwindowscontext.cpp @@ -70,6 +70,7 @@ #include #include #include +#include #include #include diff --git a/src/testlib/qtesttouch.h b/src/testlib/qtesttouch.h index 20a9476ee7f..a38e0558829 100644 --- a/src/testlib/qtesttouch.h +++ b/src/testlib/qtesttouch.h @@ -52,6 +52,7 @@ #include #include #include +#include #ifdef QT_WIDGETS_LIB #include #endif diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp index 34de756ab50..1db7e9a9c78 100644 --- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp +++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp @@ -1717,7 +1717,7 @@ public: eventType = ev->type(); eventGlobal = ev->globalPosF(); eventLocal = ev->posF(); - eventDevice = ev->device(); + eventDevice = ev->deviceType(); } QEvent::Type eventType = QEvent::None; @@ -1730,7 +1730,7 @@ public: || ev->type() == QEvent::TabletLeaveProximity) { eventType = ev->type(); QTabletEvent *te = static_cast(ev); - eventDevice = te->device(); + eventDevice = te->deviceType(); } return QWindow::eventFilter(obj, ev); }