From 8704006b87ada76b3c05420b479491b95ff73a30 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Wed, 3 Apr 2013 22:03:09 +0200 Subject: [PATCH] Be more strict about accessible text selection MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: I0eda4c29235035824105992f3db2d9a0c06dc6b5 Reviewed-by: Jan Arve Sæther --- .../accessible/quick/qaccessiblequickitem.cpp | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/plugins/accessible/quick/qaccessiblequickitem.cpp b/src/plugins/accessible/quick/qaccessiblequickitem.cpp index f24d508..12884ff 100644 --- a/src/plugins/accessible/quick/qaccessiblequickitem.cpp +++ b/src/plugins/accessible/quick/qaccessiblequickitem.cpp @@ -421,8 +421,13 @@ QString QAccessibleQuickItem::textAtOffset(int offset, QAccessible::TextBoundary void QAccessibleQuickItem::selection(int selectionIndex, int *startOffset, int *endOffset) const { - *startOffset = item()->property("selectionStart").toInt(); - *endOffset = item()->property("selectionEnd").toInt(); + if (selectionIndex == 0) { + *startOffset = item()->property("selectionStart").toInt(); + *endOffset = item()->property("selectionEnd").toInt(); + } else { + *startOffset = 0; + *endOffset = 0; + } } int QAccessibleQuickItem::selectionCount() const -- 1.7.2.5