Accessibility Mac: Fix reading of empty lines in text edit
startOffset is already one char past the newline. By adding +1 we would skip one newline if the text was \n\n. Task-number: QTBUG-38257 Change-Id: Ida49a4b690bfa71f134e9be46126f418783a3c97 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>bb10
parent
fab46b1c6f
commit
58e48831f1
|
|
@ -332,7 +332,7 @@
|
|||
startOffset = text.indexOf(QLatin1Char('\n'), startOffset) + 1;
|
||||
if (startOffset < 0) // invalid line number, return the first line
|
||||
startOffset = 0;
|
||||
int endOffset = text.indexOf(QLatin1Char('\n'), startOffset + 1);
|
||||
int endOffset = text.indexOf(QLatin1Char('\n'), startOffset);
|
||||
if (endOffset == -1)
|
||||
endOffset = text.length();
|
||||
return [NSValue valueWithRange:NSMakeRange(quint32(startOffset), quint32(endOffset - startOffset))];
|
||||
|
|
|
|||
Loading…
Reference in New Issue