Fix VoiceOver interaction with multiline text components

`convertLineOffset` requires exactly one of `line` and `offset`
parameters to be -1.

[ChangeLog][macOS][Accessibility] VoiceOver now reads all lines in
multiline text components when navigating by lines.

Change-Id: I2872c4f5255a33dd2b493b46b22e672eb5779ee8
Fixes: QTBUG-71563
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
Boris Dušek 2018-11-03 12:58:42 +01:00 committed by Frederik Gladhorn
parent bf58c70546
commit 9f6f796a50

View File

@ -351,6 +351,7 @@ static void convertLineOffset(QAccessibleTextInterface *text, int *line, int *of
if (QAccessibleTextInterface *text = iface->textInterface()) {
int line = 0; // true for all single line edits
if (iface->state().multiLine) {
line = -1;
int position = text->cursorPosition();
convertLineOffset(text, &line, &position);
}