diff options
author | Sami Nurmenniemi <sami.nurmenniemi@qt.io> | 2017-03-31 12:45:29 +0300 |
---|---|---|
committer | Sami Nurmenniemi <sami.nurmenniemi@qt.io> | 2017-04-26 09:11:41 +0000 |
commit | ba21e424638404ce663966c7f5dff8c405ecd3f2 (patch) | |
tree | c9aa701b88f375070f38869bd5697c24f06fd4cc | |
parent | 36553f8efe9c041785b3500defbc56966af413ae (diff) |
Fix tst_QWidget for platform "offscreen"
Some features are not implemented by "offscreen" platform. Skip tests
failing because of that. Some failing cases are also already skipped or
blacklisted on "xcb" platform.
Change-Id: I17269169379c270bd7d6f2ddda03ad9b114a71ce
Reviewed-by: Teemu Holappa <teemu.holappa@qt.io>
-rw-r--r-- | tests/auto/widgets/kernel/qwidget/BLACKLIST | 1 | ||||
-rw-r--r-- | tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp | 13 |
2 files changed, 13 insertions, 1 deletions
diff --git a/tests/auto/widgets/kernel/qwidget/BLACKLIST b/tests/auto/widgets/kernel/qwidget/BLACKLIST index 9981fd3447..46791ff884 100644 --- a/tests/auto/widgets/kernel/qwidget/BLACKLIST +++ b/tests/auto/widgets/kernel/qwidget/BLACKLIST @@ -5,6 +5,7 @@ ubuntu-16.04 [saveRestoreGeometry] ubuntu-14.04 ubuntu-16.04 +b2qt [restoreVersion1Geometry] ubuntu-14.04 osx diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index ace2013740..e68f0f57ef 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -2179,6 +2179,8 @@ void tst_QWidget::showMinimizedKeepsFocus() QSKIP("QTBUG-26424"); if (m_platform == QStringLiteral("wayland")) QSKIP("Wayland: This fails. Figure out why."); + if (m_platform == QStringLiteral("offscreen")) + QSKIP("Platform offscreen does not support showMinimized()"); //here we test that minimizing a widget and restoring it doesn't change the focus inside of it { @@ -3235,6 +3237,9 @@ void tst_QWidget::widgetAt() if (m_platform == QStringLiteral("wayland")) QSKIP("Wayland: This fails. Figure out why."); + if (m_platform == QStringLiteral("offscreen")) + QSKIP("Platform offscreen does not support lower()/raise() or WindowMasks"); + Q_CHECK_PAINTEVENTS const QPoint referencePos = m_availableTopLeft + QPoint(100, 100); @@ -3651,7 +3656,7 @@ void tst_QWidget::optimizedResize_topLevel() expectedUpdateRegion -= QRect(QPoint(), topLevel.size() - QSize(10, 10)); QTRY_COMPARE(topLevel.gotPaintEvent, true); - if (m_platform == QStringLiteral("xcb")) + if (m_platform == QStringLiteral("xcb") || m_platform == QStringLiteral("offscreen")) QSKIP("QTBUG-26424"); QCOMPARE(topLevel.partial, true); QCOMPARE(topLevel.paintedRegion, expectedUpdateRegion); @@ -6796,6 +6801,9 @@ void tst_QWidget::render_task217815() // Window Opacity is not supported on Windows CE. void tst_QWidget::render_windowOpacity() { + if (m_platform == QStringLiteral("offscreen")) + QSKIP("Platform offscreen does not support setting opacity"); + const qreal opacity = 0.5; { // Check that the painter opacity effects the widget drawing. @@ -7386,6 +7394,9 @@ void tst_QWidget::updateWhileMinimized() { if (m_platform == QStringLiteral("wayland")) QSKIP("Wayland: This fails. Figure out why."); + if (m_platform == QStringLiteral("offscreen")) + QSKIP("Platform offscreen does not support showMinimized()"); + #if defined(Q_OS_QNX) QSKIP("Platform does not support showMinimized()"); #endif |