summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
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/itemviews/qabstractitemview/tst_qabstractitemview.cpp
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/itemviews/qabstractitemview/tst_qabstractitemview.cpp')
-rw-r--r--tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp43
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp b/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
index 3316c8ab93..0834d989e0 100644
--- a/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
+++ b/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
@@ -26,6 +26,10 @@
**
****************************************************************************/
+#include <private/qguiapplication_p.h>
+
+#include <qpa/qplatformintegration.h>
+
#include <QAbstractItemView>
#include <QDialog>
#include <QHeaderView>
@@ -975,6 +979,9 @@ void tst_QAbstractItemView::setItemDelegate_data()
void tst_QAbstractItemView::setItemDelegate()
{
+ if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
+ QSKIP("Window activation is not supported");
+
QFETCH(const IntList, rowsOrColumnsWithDelegate);
QFETCH(QPoint, cellToEdit);
QTableView v;
@@ -1093,6 +1100,9 @@ void tst_QAbstractItemView::setCurrentIndex()
void tst_QAbstractItemView::task221955_selectedEditor()
{
+ if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
+ QSKIP("Window activation is not supported");
+
QTreeWidget tree;
tree.setColumnCount(2);
@@ -1178,6 +1188,9 @@ void tst_QAbstractItemView::task250754_fontChange()
void tst_QAbstractItemView::task200665_itemEntered()
{
+ if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
+ QSKIP("Wayland: This fails. Figure out why.");
+
//we test that view will emit entered
//when the scrollbar move but not the mouse itself
QStandardItemModel model(1000, 1);
@@ -1385,6 +1398,9 @@ void tst_QAbstractItemView::ctrlRubberbandSelection()
void tst_QAbstractItemView::QTBUG6407_extendedSelection()
{
+ if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
+ QSKIP("Window activation is not supported");
+
QListWidget view;
view.setSelectionMode(QAbstractItemView::ExtendedSelection);
for (int i = 0; i < 50; ++i)
@@ -1466,6 +1482,9 @@ void tst_QAbstractItemView::testDelegateDestroyEditor()
void tst_QAbstractItemView::testClickedSignal()
{
+ if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
+ QSKIP("Window activation is not supported");
+
QTableWidget view(5, 5);
centerOnScreen(&view);
@@ -1510,6 +1529,9 @@ public:
void tst_QAbstractItemView::testChangeEditorState()
{
+ if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
+ QSKIP("Window activation is not supported");
+
// Test for QTBUG-25370
TestModel model;
model.setItem(0, 0, new QStandardItem("a"));
@@ -1577,6 +1599,9 @@ void tst_QAbstractItemView::deselectInSingleSelection()
void tst_QAbstractItemView::testNoActivateOnDisabledItem()
{
+ if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
+ QSKIP("Window activation is not supported");
+
QTreeView treeView;
QStandardItemModel model(1, 1);
QStandardItem *item = new QStandardItem("item");
@@ -1613,6 +1638,9 @@ void tst_QAbstractItemView::testFocusPolicy_data()
void tst_QAbstractItemView::testFocusPolicy()
{
+ if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
+ QSKIP("Window activation is not supported");
+
QFETCH(QAbstractItemDelegate*, delegate);
QWidget window;
@@ -1821,6 +1849,9 @@ void tst_QAbstractItemView::shiftSelectionAfterChangingModelContents()
void tst_QAbstractItemView::QTBUG48968_reentrant_updateEditorGeometries()
{
+ if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
+ QSKIP("Wayland: This fails. Figure out why.");
+
QTreeView tree;
QStandardItemModel *m = new QStandardItemModel(&tree);
for (int i = 0; i < 10; ++i) {
@@ -2154,6 +2185,9 @@ public:
void tst_QAbstractItemView::QTBUG46785_mouseout_hover_state()
{
+ if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
+ QSKIP("Wayland: This fails. Figure out why.");
+
HoverItemDelegate delegate;
QTableWidget table(5, 5);
@@ -2232,6 +2266,9 @@ void tst_QAbstractItemView::inputMethodEnabled_data()
void tst_QAbstractItemView::inputMethodEnabled()
{
+ if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
+ QSKIP("Window activation is not supported");
+
QFETCH(QByteArray, viewType);
QFETCH(Qt::ItemFlags, itemFlags);
QFETCH(bool, result);
@@ -2312,6 +2349,9 @@ void tst_QAbstractItemView::currentFollowsIndexWidget_data()
void tst_QAbstractItemView::currentFollowsIndexWidget()
{
+ if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
+ QSKIP("Window activation is not supported");
+
QFETCH(QByteArray, viewType);
QScopedPointer<QAbstractItemView> view(viewFromString(viewType));
@@ -2369,6 +2409,9 @@ void tst_QAbstractItemView::checkFocusAfterActivationChanges_data()
void tst_QAbstractItemView::checkFocusAfterActivationChanges()
{
+ if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
+ QSKIP("Window activation is not supported");
+
QFETCH(QByteArray, viewType);
const QRect availableGeo = QGuiApplication::primaryScreen()->availableGeometry();