QIOSTextResponder: restore reset/commit logic

After 2211092aa5, parts of the reset/commit logic
was left out by a mistake. This patch will add the
missing lines back into the text responder.

Task-number: QTBUG-102960
Pick-to: 6.3
Change-Id: Ib339eae2af69ce088e251fe8571bed97bbd64fc3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
bb10
Richard Moe Gustavsen 2022-04-21 15:37:54 +02:00
parent d3457c39c4
commit bfd10af245
2 changed files with 14 additions and 0 deletions

View File

@ -63,6 +63,8 @@ QT_END_NAMESPACE
- (instancetype)initWithInputContext:(QT_PREPEND_NAMESPACE(QIOSInputContext) *)context;
- (BOOL)needsKeyboardReconfigure:(Qt::InputMethodQueries)updatedProperties;
- (void)reset;
- (void)commit;
- (void)notifyInputDelegate:(Qt::InputMethodQueries)updatedProperties;

View File

@ -490,6 +490,18 @@
return [super needsKeyboardReconfigure:updatedProperties];
}
- (void)reset
{
[self setMarkedText:@"" selectedRange:NSMakeRange(0, 0)];
[self notifyInputDelegate:Qt::ImSurroundingText];
}
- (void)commit
{
[self unmarkText];
[self notifyInputDelegate:Qt::ImSurroundingText];
}
// -------------------------------------------------------------------------
#ifndef QT_NO_SHORTCUT