summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/graphicsview
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-10-11 15:21:54 +0200
committerJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-10-18 10:53:34 +0200
commit52484cc4b6696c8a5c1f69125d81eb0cede8cdb2 (patch)
tree4d5b0d4135104a7a623325fb761b615760630b98 /tests/auto/widgets/graphicsview
parentdce8849037ee079d6b09dd4022aa80aa670caccd (diff)
Widget tests: Skip tests that fail on Wayland
Either by testing for platform name or window activation. After this gets in, we can enable widget tests in the Wayland bot, which hopefully will reduce the number of regressions in the Wayland plugin. Fixes: QTBUG-62188 Change-Id: I71ce8abd6b5891e5b953126b1c35345892585931 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'tests/auto/widgets/graphicsview')
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicspixmapitem/tst_qgraphicspixmapitem.cpp3
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp15
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp17
3 files changed, 35 insertions, 0 deletions
diff --git a/tests/auto/widgets/graphicsview/qgraphicspixmapitem/tst_qgraphicspixmapitem.cpp b/tests/auto/widgets/graphicsview/qgraphicspixmapitem/tst_qgraphicspixmapitem.cpp
index 78fe448bdb..f7e7022059 100644
--- a/tests/auto/widgets/graphicsview/qgraphicspixmapitem/tst_qgraphicspixmapitem.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicspixmapitem/tst_qgraphicspixmapitem.cpp
@@ -152,6 +152,9 @@ void tst_QGraphicsPixmapItem::contains_data()
// public bool contains(QPointF const& point) const
void tst_QGraphicsPixmapItem::contains()
{
+ if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
+ QSKIP("Wayland: This fails. Figure out why.");
+
QFETCH(QPixmap, pixmap);
QFETCH(QPointF, point);
QFETCH(bool, contains);
diff --git a/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
index 950f3ef670..b49d2cd8b0 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
@@ -3078,6 +3078,9 @@ void tst_QGraphicsScene::tabFocus_emptyScene()
void tst_QGraphicsScene::tabFocus_sceneWithFocusableItems()
{
+ if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
+ QSKIP("Window activation is not supported");
+
QGraphicsScene scene;
QGraphicsTextItem *item = scene.addText("Qt rocks!");
item->setTabChangesFocus(true);
@@ -3218,6 +3221,9 @@ protected:
void tst_QGraphicsScene::tabFocus_sceneWithFocusWidgets()
{
+ if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
+ QSKIP("Window activation is not supported");
+
QGraphicsScene scene;
FocusWidget *widget1 = new FocusWidget;
@@ -3287,6 +3293,9 @@ void tst_QGraphicsScene::tabFocus_sceneWithFocusWidgets()
void tst_QGraphicsScene::tabFocus_sceneWithNestedFocusWidgets()
{
+ if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
+ QSKIP("Window activation is not supported");
+
QGraphicsScene scene;
FocusWidget *widget1 = new FocusWidget;
@@ -3811,6 +3820,9 @@ public:
void tst_QGraphicsScene::inputMethod()
{
+ if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
+ QSKIP("Wayland: This fails. Figure out why.");
+
PlatformInputContext inputContext;
QInputMethodPrivate *inputMethodPrivate =
QInputMethodPrivate::get(QGuiApplication::inputMethod());
@@ -4054,6 +4066,9 @@ void tst_QGraphicsScene::polishItems2()
void tst_QGraphicsScene::isActive()
{
+ if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
+ QSKIP("Window activation is not supported");
+
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
QSKIP("Fails on Android (QTBUG-44430)");
#endif
diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
index e21b1b889a..cf8066c7a3 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
@@ -418,6 +418,9 @@ void tst_QGraphicsView::alignment()
void tst_QGraphicsView::interactive()
{
+ if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
+ QSKIP("Window activation is not supported");
+
TestItem *item = new TestItem;
item->setFlags(QGraphicsItem::ItemIsMovable);
QCOMPARE(item->events.size(), 0);
@@ -3297,6 +3300,9 @@ void tst_QGraphicsView::task186827_deleteReplayedItem()
void tst_QGraphicsView::task207546_focusCrash()
{
+ if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
+ QSKIP("Window activation is not supported");
+
class _Widget : public QWidget
{
public:
@@ -3641,6 +3647,8 @@ void tst_QGraphicsView::moveItemWhileScrolling()
int a = adjustForAntialiasing ? 2 : 1;
expectedRegion += QRect(40, 50, 10, 10).adjusted(-a, -a, a, a);
expectedRegion += QRect(40, 60, 10, 10).adjusted(-a, -a, a, a);
+ if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
+ QSKIP("Wayland: This fails. Figure out why.");
COMPARE_REGIONS(view.lastPaintedRegion, expectedRegion);
}
@@ -4394,6 +4402,9 @@ void tst_QGraphicsView::inputMethodSensitivity()
void tst_QGraphicsView::inputContextReset()
{
+ if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
+ QSKIP("Window activation is not supported");
+
PlatformInputContext inputContext;
QInputMethodPrivate *inputMethodPrivate = QInputMethodPrivate::get(qApp->inputMethod());
inputMethodPrivate->testContext = &inputContext;
@@ -4652,6 +4663,9 @@ void tst_QGraphicsView::QTBUG_4151_clipAndIgnore_data()
void tst_QGraphicsView::QTBUG_4151_clipAndIgnore()
{
+ if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
+ QSKIP("Wayland: This fails. Figure out why.");
+
QFETCH(bool, clip);
QFETCH(bool, ignoreTransformations);
QFETCH(int, numItems);
@@ -4834,6 +4848,9 @@ QRectF IMItem::mf(1.5, 1.6, 10, 10);
void tst_QGraphicsView::QTBUG_16063_microFocusRect()
{
+ if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
+ QSKIP("Wayland: This fails. Figure out why.");
+
QGraphicsScene scene;
IMItem *item = new IMItem();
scene.addItem(item);