iOS: remove registered undo/redo actions upon qiostextresponder dealloc

QIOSTextResponder add actions to its own NSUndoManager. But
we need to remove those actions again when the responder is
deallocated, otherwise it can lead to a crash in UIKit when
swiping between apps.

Fixes: QTBUG-123843
Pick-to: 6.8 6.5 6.2
Change-Id: I404751bc50692a960e568ff2eb0f1754da0cec31
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 42f29da7a5b6c6969c169e9a868696a968ca930d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Richard Moe Gustavsen 2024-12-23 11:49:12 +01:00 committed by Qt Cherry-pick Bot
parent 6d8afaac84
commit 9db6df1a56

View File

@ -424,6 +424,7 @@
{
self.inputView = 0;
self.inputAccessoryView = 0;
[self.undoManager removeAllActions];
[super dealloc];
}