Android: wrap QAndroidInputContext's m_focusObject in a QPointer

To make sure we don't end up use a dangling pointer for m_focusObject.

Pick-to: 6.2 6.3 5.15
Task-number: QTBUG-102447
Change-Id: I75058040be109a39f830bc706efe85969ffbc8ec
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
bb10
Assam Boudjelthia 2022-04-11 14:38:03 +03:00
parent 9662c7da8f
commit 0742e5770b
1 changed files with 1 additions and 1 deletions

View File

@ -163,7 +163,7 @@ private:
QMetaObject::Connection m_updateCursorPosConnection;
HandleModes m_handleMode;
int m_batchEditNestingLevel;
QObject *m_focusObject;
QPointer<QObject> m_focusObject;
QTimer m_hideCursorHandleTimer;
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QAndroidInputContext::HandleModes)