summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2021-05-07 13:25:42 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-05-28 10:03:55 +0000
commitc5d381a5920379affe146957b6c2b9e80d5dccf4 (patch)
tree8464c048afa4efbeade7f9239eca3e3f5d285c1b /src
parent743f4c7ca3ec800bc29c44c6963d34e14e5fb324 (diff)
iOS: Accessibility: Don't cut off the last character from the text value
The second parameter is the position of the first character not to be returned when calling text(). So it needs to be passed the length of the text, otherwise the last character is cut off. Task-number: QTBUG-93494 Change-Id: I7dd8324b3939220de125ba819b7b77588b21bd4b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 5c29f981fa069907678f961cf58ecefd64bf268b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/ios/quiaccessibilityelement.mm3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/platforms/ios/quiaccessibilityelement.mm b/src/plugins/platforms/ios/quiaccessibilityelement.mm
index be3f713b98..d2792838c0 100644
--- a/src/plugins/platforms/ios/quiaccessibilityelement.mm
+++ b/src/plugins/platforms/ios/quiaccessibilityelement.mm
@@ -123,8 +123,7 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QMacAccessibilityElement);
if (val) {
return val->currentValue().toString().toNSString();
} else if (QAccessibleTextInterface *text = iface->textInterface()) {
- // FIXME doesn't work?
- return text->text(0, text->characterCount() - 1).toNSString();
+ return text->text(0, text->characterCount()).toNSString();
}
return [super accessibilityHint];