diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-04-22 18:41:37 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-25 15:18:29 +0200 |
commit | 58e48831f17f154e4b7a4cd9b519e9ce4e645d8c (patch) | |
tree | 9d7ecc7b2460dfd00b62ed54d299fa9043c49e24 /src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm | |
parent | fab46b1c6fb170bd8adc9a289fd5b33e7c6200ab (diff) |
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>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm index 1df4230385..474e799a11 100644 --- a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm +++ b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm @@ -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))]; |