summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qgraphicsview/tst_qgraphicsview.cpp')
-rw-r--r--tests/auto/qgraphicsview/tst_qgraphicsview.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
index f07453c..1ff06c2 100644
--- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
@@ -3600,6 +3600,7 @@ void tst_QGraphicsView::inputMethodSensitivity()
item->setFlag(QGraphicsItem::ItemIsFocusable);
scene.addItem(item);
scene.setFocusItem(item);
+ QCOMPARE(scene.focusItem(), item);
QCOMPARE(view.testAttribute(Qt::WA_InputMethodEnabled), true);
item->setFlag(QGraphicsItem::ItemAcceptsInputMethod, false);
@@ -3614,27 +3615,35 @@ void tst_QGraphicsView::inputMethodSensitivity()
scene.addItem(item2);
scene.setFocusItem(item2);
QCOMPARE(view.testAttribute(Qt::WA_InputMethodEnabled), false);
+ QCOMPARE(scene.focusItem(), item2);
scene.setFocusItem(item);
QCOMPARE(view.testAttribute(Qt::WA_InputMethodEnabled), true);
+ QCOMPARE(scene.focusItem(), item);
view.setScene(0);
QCOMPARE(view.testAttribute(Qt::WA_InputMethodEnabled), false);
+ QCOMPARE(scene.focusItem(), item);
view.setScene(&scene);
QCOMPARE(view.testAttribute(Qt::WA_InputMethodEnabled), true);
+ QCOMPARE(scene.focusItem(), item);
scene.setFocusItem(item2);
QCOMPARE(view.testAttribute(Qt::WA_InputMethodEnabled), false);
+ QCOMPARE(scene.focusItem(), item2);
view.setScene(0);
QCOMPARE(view.testAttribute(Qt::WA_InputMethodEnabled), false);
+ QCOMPARE(scene.focusItem(), item2);
scene.setFocusItem(item);
QCOMPARE(view.testAttribute(Qt::WA_InputMethodEnabled), false);
+ QCOMPARE(scene.focusItem(), item);
view.setScene(&scene);
QCOMPARE(view.testAttribute(Qt::WA_InputMethodEnabled), true);
+ QCOMPARE(scene.focusItem(), item);
}
class InputContextTester : public QInputContext