QMutable{Touch,SinglePoint}Event: Remove unsafe from() getters

The getters were used to convert types in an undefined manner.
No usage of the methods outside of qtbase (Qt and KDE searched)
has been found, and qtbase is already fixed.

Change-Id: I9fe77de842a2e0023b011e6eee257d6c6a28a3f5
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This commit is contained in:
Allan Sandfeld Jensen 2024-11-12 16:25:28 +01:00 committed by Tor Arne Vestbø
parent 932d87a294
commit e9cabe22c1

View File

@ -34,10 +34,6 @@ public:
QTouchEvent(eventType, device, modifiers, touchPoints) { }
~QMutableTouchEvent() override;
static QMutableTouchEvent *from(QTouchEvent *e) { return static_cast<QMutableTouchEvent *>(e); }
static QMutableTouchEvent &from(QTouchEvent &e) { return static_cast<QMutableTouchEvent &>(e); }
void setTarget(QObject *target) { m_target = target; }
void addPoint(const QEventPoint &point);
@ -56,10 +52,6 @@ public:
QSinglePointEvent(type, device, point, button, buttons, modifiers, source) { }
~QMutableSinglePointEvent() override;
static QMutableSinglePointEvent *from(QSinglePointEvent *e) { return static_cast<QMutableSinglePointEvent *>(e); }
static QMutableSinglePointEvent &from(QSinglePointEvent &e) { return static_cast<QMutableSinglePointEvent &>(e); }
void setSource(Qt::MouseEventSource s) { m_source = s; }
bool isDoubleClick() { return m_doubleClick; }