summaryrefslogtreecommitdiffstats
path: root/src/plugins/accessible
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2012-10-06 02:53:44 +0300
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-13 03:17:39 +0200
commit4717d36c9110f016868e37d9eff74b1d28af5a9c (patch)
tree7d815c2913c2df3532275d2ed2ffef748ffb2580 /src/plugins/accessible
parent539ef45689e0d038b6cd83d772597a5be886d8ff (diff)
Fix QTextBoundaryFinder usage cases in QAccessible2
Make the implementation safer and closer to what http://www.linuxfoundation.org/collaborate/workgroups/accessibility/ia2/ia2_implementation_guide#boundaries requires us to do. Change-Id: I00af4697e52a9b6e7f5d7b3f403b29126fa1517b Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Diffstat (limited to 'src/plugins/accessible')
-rw-r--r--src/plugins/accessible/widgets/simplewidgets.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/plugins/accessible/widgets/simplewidgets.cpp b/src/plugins/accessible/widgets/simplewidgets.cpp
index 2015929010..bb90061a7e 100644
--- a/src/plugins/accessible/widgets/simplewidgets.cpp
+++ b/src/plugins/accessible/widgets/simplewidgets.cpp
@@ -72,13 +72,6 @@ extern QList<QWidget*> childWidgets(const QWidget *widget, bool includeTopLevel
QString Q_GUI_EXPORT qt_accStripAmp(const QString &text);
QString Q_GUI_EXPORT qt_accHotKey(const QString &text);
-QString Q_GUI_EXPORT qTextBeforeOffsetFromString(int offset, QAccessible2::BoundaryType boundaryType,
- int *startOffset, int *endOffset, const QString& text);
-QString Q_GUI_EXPORT qTextAtOffsetFromString(int offset, QAccessible2::BoundaryType boundaryType,
- int *startOffset, int *endOffset, const QString& text);
-QString Q_GUI_EXPORT qTextAfterOffsetFromString(int offset, QAccessible2::BoundaryType boundaryType,
- int *startOffset, int *endOffset, const QString& text);
-
/*!
\class QAccessibleButton
\brief The QAccessibleButton class implements the QAccessibleInterface for button type widgets.
@@ -725,7 +718,7 @@ QString QAccessibleLineEdit::textBeforeOffset(int offset, BoundaryType boundaryT
*startOffset = *endOffset = -1;
return QString();
}
- return qTextBeforeOffsetFromString(offset, boundaryType, startOffset, endOffset, lineEdit()->text());
+ return QAccessibleTextInterface::textBeforeOffset(offset, boundaryType, startOffset, endOffset);
}
QString QAccessibleLineEdit::textAfterOffset(int offset, BoundaryType boundaryType,
@@ -735,7 +728,7 @@ QString QAccessibleLineEdit::textAfterOffset(int offset, BoundaryType boundaryTy
*startOffset = *endOffset = -1;
return QString();
}
- return qTextAfterOffsetFromString(offset, boundaryType, startOffset, endOffset, lineEdit()->text());
+ return QAccessibleTextInterface::textAfterOffset(offset, boundaryType, startOffset, endOffset);
}
QString QAccessibleLineEdit::textAtOffset(int offset, BoundaryType boundaryType,
@@ -745,7 +738,7 @@ QString QAccessibleLineEdit::textAtOffset(int offset, BoundaryType boundaryType,
*startOffset = *endOffset = -1;
return QString();
}
- return qTextAtOffsetFromString(offset, boundaryType, startOffset, endOffset, lineEdit()->text());
+ return QAccessibleTextInterface::textAtOffset(offset, boundaryType, startOffset, endOffset);
}
void QAccessibleLineEdit::removeSelection(int selectionIndex)