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
Frederik Gladhorn 2014-04-22 18:41:37 +02:00 committed by The Qt Project
parent fab46b1c6f
commit 58e48831f1
1 changed files with 1 additions and 1 deletions

View File

@ -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))];