summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/kernel/qwidget
diff options
context:
space:
mode:
authorAxel Spoerl <axel.spoerl@qt.io>2022-10-05 09:10:16 +0200
committerAxel Spoerl <axel.spoerl@qt.io>2022-10-06 10:49:16 +0200
commitb439f06941007483ee14aeeb4fb09ac8148c8038 (patch)
tree310461a2900e9259e614585e8fc1895463ed5bb6 /tests/auto/widgets/kernel/qwidget
parent4945fd93f13d2fc34adf260fd0e0325d0794f3f7 (diff)
Remove focusProxyAndInputMethods from tst_QWidget
focusProxyAndInputMethods tests focus acquisition and inheritance with a toplevel widget, acting as a focus proxy for a child. X11 window managers are set to be bypassed, programmatic focus is set with QApplicationPrivate::setActiveWindow(). The test is flaky on Linux/XCB, and therefore blacklisted on most Linuxes. This patch removes focusProxyAndInputMethods, considering that - focus proxying is tested in tst_QWidget::focusProxy() - window activation and focus inheritance are tested in tst_QWindow::isActive() Pick-to: 6.4 6.3 6.2 5.15 Change-Id: I510fd935399d9ad0b6cd76f1bd5db0811e0702f6 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'tests/auto/widgets/kernel/qwidget')
-rw-r--r--tests/auto/widgets/kernel/qwidget/BLACKLIST5
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp29
2 files changed, 0 insertions, 34 deletions
diff --git a/tests/auto/widgets/kernel/qwidget/BLACKLIST b/tests/auto/widgets/kernel/qwidget/BLACKLIST
index 24387635b4..7bd4c0a304 100644
--- a/tests/auto/widgets/kernel/qwidget/BLACKLIST
+++ b/tests/auto/widgets/kernel/qwidget/BLACKLIST
@@ -3,11 +3,6 @@
ubuntu-16.04
[restoreVersion1Geometry]
ubuntu-16.04
-[focusProxyAndInputMethods]
-rhel-7.6
-centos
-opensuse-leap
-ubuntu
[raise]
opensuse-leap
# QTBUG-68175
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
index 914adc02c2..2d8e267730 100644
--- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
+++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
@@ -368,7 +368,6 @@ private slots:
void openModal_taskQTBUG_5804();
void focusProxy();
- void focusProxyAndInputMethods();
void imEnabledNotImplemented();
#ifdef QT_BUILD_INTERNAL
@@ -10956,34 +10955,6 @@ void tst_QWidget::focusProxy()
QCOMPARE(container2->focusOutCount, 1);
}
-void tst_QWidget::focusProxyAndInputMethods()
-{
- if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
- QSKIP("Window activation is not supported.");
- QScopedPointer<QWidget> toplevel(new QWidget(nullptr, Qt::X11BypassWindowManagerHint));
- toplevel->setWindowTitle(QLatin1String(QTest::currentTestFunction()));
- toplevel->resize(200, 200);
- toplevel->setAttribute(Qt::WA_InputMethodEnabled, true);
-
- QWidget *child = new QWidget(toplevel.data());
- child->setFocusProxy(toplevel.data());
- child->setAttribute(Qt::WA_InputMethodEnabled, true);
-
- toplevel->setFocusPolicy(Qt::WheelFocus);
- child->setFocusPolicy(Qt::WheelFocus);
-
- QVERIFY(!child->hasFocus());
- QVERIFY(!toplevel->hasFocus());
-
- toplevel->show();
- QVERIFY(QTest::qWaitForWindowExposed(toplevel.data()));
- QApplicationPrivate::setActiveWindow(toplevel.data());
- QVERIFY(QTest::qWaitForWindowActive(toplevel.data()));
- QVERIFY(toplevel->hasFocus());
- QVERIFY(child->hasFocus());
- QCOMPARE(qApp->focusObject(), toplevel.data());
-}
-
void tst_QWidget::imEnabledNotImplemented()
{
// Check that a plain widget doesn't report that it supports IM. Only