diff options
author | Boris Dušek <me@dusek.me> | 2018-11-03 13:59:22 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@qt.io> | 2018-11-23 06:42:54 +0000 |
commit | 9dc19d6716f936e8b93a63fb2d27565e43ccb1ca (patch) | |
tree | 8d4d3d110ef63497264e0c3120a82a073d0bbbd0 /src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm | |
parent | 9f6f796a50bf42290d8abbbb08149bd98b1619a3 (diff) |
qcocoaaccessibilityelement.mm: Document convertLineOffset function
Change-Id: I359768a7cbd4c3e1e11a453a32bb28add891cf20
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm index 68cf273f32..63233a0390 100644 --- a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm +++ b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm @@ -51,6 +51,19 @@ QT_USE_NAMESPACE #ifndef QT_NO_ACCESSIBILITY +/** + * Converts between absolute character offsets and line numbers of a + * QAccessibleTextInterface. Works in exactly one of two modes: + * + * - Pass *line == -1 in order to get a line containing character at the given + * *offset + * - Pass *offset == -1 in order to get the offset of first character of the + * given *line + * + * You can optionally also pass non-NULL `start` and `end`, which will in both + * modes be filled with the offset of the first and last characters of the + * relevant line. + */ static void convertLineOffset(QAccessibleTextInterface *text, int *line, int *offset, NSUInteger *start = 0, NSUInteger *end = 0) { Q_ASSERT(*line == -1 || *offset == -1); |