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() Change-Id: I510fd935399d9ad0b6cd76f1bd5db0811e0702f6 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit b439f06941007483ee14aeeb4fb09ac8148c8038)
This commit is contained in:
parent
840484b4cb
commit
89583fe7d0
@ -3,11 +3,6 @@
|
|||||||
ubuntu-16.04
|
ubuntu-16.04
|
||||||
[restoreVersion1Geometry]
|
[restoreVersion1Geometry]
|
||||||
ubuntu-16.04
|
ubuntu-16.04
|
||||||
[focusProxyAndInputMethods]
|
|
||||||
rhel-7.6
|
|
||||||
centos
|
|
||||||
opensuse-leap
|
|
||||||
ubuntu
|
|
||||||
[raise]
|
[raise]
|
||||||
opensuse-leap
|
opensuse-leap
|
||||||
# QTBUG-68175
|
# QTBUG-68175
|
||||||
|
@ -368,7 +368,6 @@ private slots:
|
|||||||
void openModal_taskQTBUG_5804();
|
void openModal_taskQTBUG_5804();
|
||||||
|
|
||||||
void focusProxy();
|
void focusProxy();
|
||||||
void focusProxyAndInputMethods();
|
|
||||||
void imEnabledNotImplemented();
|
void imEnabledNotImplemented();
|
||||||
|
|
||||||
#ifdef QT_BUILD_INTERNAL
|
#ifdef QT_BUILD_INTERNAL
|
||||||
@ -10956,34 +10955,6 @@ void tst_QWidget::focusProxy()
|
|||||||
QCOMPARE(container2->focusOutCount, 1);
|
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()));
|
|
||||||
QApplication::setActiveWindow(toplevel.data());
|
|
||||||
QVERIFY(QTest::qWaitForWindowActive(toplevel.data()));
|
|
||||||
QVERIFY(toplevel->hasFocus());
|
|
||||||
QVERIFY(child->hasFocus());
|
|
||||||
QCOMPARE(qApp->focusObject(), toplevel.data());
|
|
||||||
}
|
|
||||||
|
|
||||||
void tst_QWidget::imEnabledNotImplemented()
|
void tst_QWidget::imEnabledNotImplemented()
|
||||||
{
|
{
|
||||||
// Check that a plain widget doesn't report that it supports IM. Only
|
// Check that a plain widget doesn't report that it supports IM. Only
|
||||||
|
Loading…
x
Reference in New Issue
Block a user