tests: skip a few tests in tst_QWidget on Wayland

QWindow::requestActivate() is not supported.

* tst_QWidget::dumpObjectTree()
* tst_QWidget::enterLeaveOnWindowShowHide()
* tst_QWidget::imEnabledNotImplemented()
* tst_QWidget::activateWhileModalHidden()

Task-number: QTBUG-107157
Pick-to: 6.4 6.2
Change-Id: Ic8e0eeff05cfc4e6dc16fc570caf80a1dcc57800
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
bb10
Liang Qi 2022-10-12 14:11:33 +02:00
parent 584aa8ad41
commit 89b54bb4ec
1 changed files with 12 additions and 0 deletions

View File

@ -9157,6 +9157,9 @@ void tst_QWidget::opaqueChildren()
void tst_QWidget::dumpObjectTree()
{
if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
QSKIP("QWindow::requestActivate() is not supported.");
QWidget w;
w.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
Q_SET_OBJECT_NAME(w);
@ -10184,6 +10187,9 @@ void tst_QWidget::enterLeaveOnWindowShowHide_data()
*/
void tst_QWidget::enterLeaveOnWindowShowHide()
{
if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
QSKIP("QWindow::requestActivate() is not supported.");
QFETCH(Qt::WindowType, windowType);
class Widget : public QWidget
{
@ -10960,6 +10966,9 @@ void tst_QWidget::focusProxy()
void tst_QWidget::imEnabledNotImplemented()
{
if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
QSKIP("QWindow::requestActivate() is not supported.");
// Check that a plain widget doesn't report that it supports IM. Only
// widgets that implements either Qt::ImEnabled, or the Qt4 backup
// solution, Qt::ImSurroundingText, should do so.
@ -12764,6 +12773,9 @@ void tst_QWidget::setParentChangesFocus()
void tst_QWidget::activateWhileModalHidden()
{
if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
QSKIP("QWindow::requestActivate() is not supported.");
QDialog dialog;
dialog.setWindowModality(Qt::ApplicationModal);
dialog.show();