summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/accessible/qaccessiblewidget.cpp2
-rw-r--r--tests/auto/qaccessibility/tst_qaccessibility.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/accessible/qaccessiblewidget.cpp b/src/gui/accessible/qaccessiblewidget.cpp
index beb251b..a03bc34 100644
--- a/src/gui/accessible/qaccessiblewidget.cpp
+++ b/src/gui/accessible/qaccessiblewidget.cpp
@@ -940,7 +940,7 @@ QAccessible::State QAccessibleWidget::state(int child) const
QWidget *w = widget();
if (w->testAttribute(Qt::WA_WState_Visible) == false)
state |= Invisible;
- if (w->focusPolicy() != Qt::NoFocus && w->isActiveWindow())
+ if (w->focusPolicy() != Qt::NoFocus)
state |= Focusable;
if (w->hasFocus())
state |= Focused;
diff --git a/tests/auto/qaccessibility/tst_qaccessibility.cpp b/tests/auto/qaccessibility/tst_qaccessibility.cpp
index 9d1ca91..1b35349 100644
--- a/tests/auto/qaccessibility/tst_qaccessibility.cpp
+++ b/tests/auto/qaccessibility/tst_qaccessibility.cpp
@@ -3027,7 +3027,7 @@ void tst_QAccessibility::lineEditTest()
QCOMPARE(iface->childCount(), 0);
QVERIFY(iface->state(0) & QAccessible::Sizeable);
QVERIFY(iface->state(0) & QAccessible::Movable);
- QCOMPARE(bool(iface->state(0) & QAccessible::Focusable), le->isActiveWindow());
+ QVERIFY(iface->state(0) & QAccessible::Focusable);
QVERIFY(iface->state(0) & QAccessible::Selectable);
QVERIFY(iface->state(0) & QAccessible::HasPopup);
QCOMPARE(bool(iface->state(0) & QAccessible::Focused), le->hasFocus());
@@ -3056,7 +3056,7 @@ void tst_QAccessibility::lineEditTest()
QApplication::processEvents();
QVERIFY(!(iface->state(0) & QAccessible::Sizeable));
QVERIFY(!(iface->state(0) & QAccessible::Movable));
- QCOMPARE(bool(iface->state(0) & QAccessible::Focusable), le->isActiveWindow());
+ QVERIFY(iface->state(0) & QAccessible::Focusable);
QVERIFY(iface->state(0) & QAccessible::Selectable);
QVERIFY(iface->state(0) & QAccessible::HasPopup);
QCOMPARE(bool(iface->state(0) & QAccessible::Focused), le->hasFocus());