summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
diff options
context:
space:
mode:
authorFrédéric Lefebvre <frederic.lefebvre@qt.io>2024-02-02 10:45:57 +0100
committerFrédéric Lefebvre <frederic.lefebvre@qt.io>2024-04-29 21:20:25 +0200
commit3cb3a2511cef94d201f7f3813bba995a9b4d856b (patch)
tree79ee82d67a04625c32c30d4f54f23e709adf89a4 /tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
parent59d24e361538e8ea03adc12785cbb73ecba61ab2 (diff)
tst_QAbstractView::inputMethodEnabled() remove setActiveWindow()
2f6fe3a26843ff68c5d3f9af0a2fc3cce6caac22 has made calls to QApplicationPrivate::setActiveWindow() redundant. Remove 6 redundant calls from the //Check focus by switching the activation of the window to force a focus in section. Task-number: QTBUG-121488 Change-Id: I9f1ff1680ae01253261717ee81920ec38dfe8847 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Diffstat (limited to 'tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp')
-rw-r--r--tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp b/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
index 53816226bc..6aaf7c75ef 100644
--- a/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
+++ b/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
@@ -2457,15 +2457,11 @@ void tst_QAbstractItemView::inputMethodEnabled()
// Check focus by switching the activation of the window to force a focus in
view->setCurrentIndex(model->index(1, 0));
- QApplicationPrivate::setActiveWindow(nullptr);
- QApplicationPrivate::setActiveWindow(view.data());
QVERIFY(QTest::qWaitForWindowActive(view.data()));
QCOMPARE(view->testAttribute(Qt::WA_InputMethodEnabled), result);
view->setCurrentIndex(QModelIndex());
QVERIFY(!view->testAttribute(Qt::WA_InputMethodEnabled));
- QApplicationPrivate::setActiveWindow(nullptr);
- QApplicationPrivate::setActiveWindow(view.data());
QVERIFY(QTest::qWaitForWindowActive(view.data()));
QModelIndex index = model->index(1, 0);
QPoint p = view->visualRect(index).center();
@@ -2475,8 +2471,6 @@ void tst_QAbstractItemView::inputMethodEnabled()
QCOMPARE(view->testAttribute(Qt::WA_InputMethodEnabled), result);
index = model->index(0, 0);
- QApplicationPrivate::setActiveWindow(nullptr);
- QApplicationPrivate::setActiveWindow(view.data());
QVERIFY(QTest::qWaitForWindowActive(view.data()));
p = view->visualRect(index).center();
QTest::mouseClick(view->viewport(), Qt::LeftButton, Qt::NoModifier, p);