summaryrefslogtreecommitdiffstats
path: root/util/accessibilityinspector/screenreader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'util/accessibilityinspector/screenreader.cpp')
-rw-r--r--util/accessibilityinspector/screenreader.cpp26
1 files changed, 6 insertions, 20 deletions
diff --git a/util/accessibilityinspector/screenreader.cpp b/util/accessibilityinspector/screenreader.cpp
index aa17bfb6ee..5560743bc6 100644
--- a/util/accessibilityinspector/screenreader.cpp
+++ b/util/accessibilityinspector/screenreader.cpp
@@ -97,31 +97,17 @@ void ScreenReader::processTouchPoint()
int hit = -2;
int guardCounter = 0;
const int guardMax = 40;
- while (hit != 0) {
+ while (currentInterface != 0) {
++guardCounter;
if (guardCounter > guardMax) {
qDebug() << "touchPoint exit recursion overflow";
return; // outside
}
-/*
- hit = currentInterface->childAt(m_currentTouchPoint.x(), m_currentTouchPoint.y());
- //qDebug() << "hit" << hit;
- if (hit == -1) {
- return; // outside
- } else if (hit == 0) {
- break; // found it.
- } else {
- QAccessibleInterface *childInterface = 0;
- int child = currentInterface->navigate(QAccessible::Child, hit, &childInterface);
- if (childInterface == 0) {
- return; // navigation error
- }
-
- if (currentInterface != m_rootInterface)
- delete currentInterface;
- currentInterface = childInterface;
- }
-*/
+
+ QAccessibleInterface * hit = currentInterface->childAt(m_currentTouchPoint.x(), m_currentTouchPoint.y());
+ if (!hit)
+ break;
+ currentInterface = hit;
}
m_selectedInterface = currentInterface;