summaryrefslogtreecommitdiffstats
path: root/src/plugins/accessible/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/accessible/widgets')
-rw-r--r--src/plugins/accessible/widgets/qaccessiblewidgets.cpp11
-rw-r--r--src/plugins/accessible/widgets/qaccessiblewidgets.h2
2 files changed, 11 insertions, 2 deletions
diff --git a/src/plugins/accessible/widgets/qaccessiblewidgets.cpp b/src/plugins/accessible/widgets/qaccessiblewidgets.cpp
index 9d0d3f0145..56e6166e85 100644
--- a/src/plugins/accessible/widgets/qaccessiblewidgets.cpp
+++ b/src/plugins/accessible/widgets/qaccessiblewidgets.cpp
@@ -134,7 +134,7 @@ void QAccessiblePlainTextEdit::setText(QAccessible::Text t, const QString &text)
QAccessible::State QAccessiblePlainTextEdit::state() const
{
- QAccessible::State st = QAccessibleWidget::state();
+ QAccessible::State st = QAccessibleTextWidget::state();
if (plainTextEdit()->isReadOnly())
st.readOnly = true;
else
@@ -258,7 +258,7 @@ void QAccessibleTextEdit::setText(QAccessible::Text t, const QString &text)
QAccessible::State QAccessibleTextEdit::state() const
{
- QAccessible::State st = QAccessibleWidget::state();
+ QAccessible::State st = QAccessibleTextWidget::state();
if (textEdit()->isReadOnly())
st.readOnly = true;
else
@@ -806,6 +806,13 @@ QAccessibleTextWidget::QAccessibleTextWidget(QWidget *o, QAccessible::Role r, co
}
+QAccessible::State QAccessibleTextWidget::state() const
+{
+ QAccessible::State s = QAccessibleWidget::state();
+ s.multiLine = true;
+ return s;
+}
+
QRect QAccessibleTextWidget::characterRect(int offset) const
{
QTextBlock block = textDocument()->findBlock(offset);
diff --git a/src/plugins/accessible/widgets/qaccessiblewidgets.h b/src/plugins/accessible/widgets/qaccessiblewidgets.h
index d93cd6cd78..e14b89a63b 100644
--- a/src/plugins/accessible/widgets/qaccessiblewidgets.h
+++ b/src/plugins/accessible/widgets/qaccessiblewidgets.h
@@ -76,6 +76,8 @@ class QAccessibleTextWidget : public QAccessibleWidget,
public:
QAccessibleTextWidget(QWidget *o, QAccessible::Role r = QAccessible::EditableText, const QString &name = QString());
+ QAccessible::State state() const;
+
// QAccessibleTextInterface
// selection
void selection(int selectionIndex, int *startOffset, int *endOffset) const;