Skip to content

Commit

Permalink
tst_QDockWidget: Refactor skipping for Wayland
Browse files Browse the repository at this point in the history
QTest mouse emulation doesn't support drag & drop on wayland.
This is why all tests fail, where dock widgets are undocked by mouse.

Move skipping in the qCreateFloatingTabs macro, where possible.
Remove skipping where possible.

Fixes: QTBUG-129362
Change-Id: Ic71529f34b8bc39864c9eccadc2aff7b6d426ca8
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit 597f4bd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
  • Loading branch information
ASpoerl authored and Qt Cherry-pick Bot committed Sep 28, 2024
1 parent 64da99d commit 47ee855
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ private slots:
QSKIP("Platform not supported");
#else
#define qCreateFloatingTabs(mainWindow, centralWidget, d1, d2, path1, path2)\
if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))\
QSKIP("Test skipped on Wayland.");\
createFloatingTabs(mainWindow, centralWidget, d1, d2, path1, path2);\
std::unique_ptr<QMainWindow> up_mainWindow(mainWindow);\
if (!platformSupportingRaise)\
Expand Down Expand Up @@ -914,8 +916,7 @@ void tst_QDockWidget::restoreStateWhileStillFloating()
void tst_QDockWidget::restoreDockWidget()
{
if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
QSKIP("Fails on Wayland: QTBUG-91483");

QSKIP("Test skipped on Wayland.");
QByteArray geometry;
QByteArray state;

Expand Down Expand Up @@ -1073,9 +1074,6 @@ void tst_QDockWidget::task248604_infiniteResize()

void tst_QDockWidget::task258459_visibilityChanged()
{
if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
QSKIP("Wayland: This fails. Figure out why.");

QMainWindow win;
QDockWidget dock1, dock2;
win.addDockWidget(Qt::RightDockWidgetArea, &dock1);
Expand Down Expand Up @@ -1110,9 +1108,6 @@ void tst_QDockWidget::taskQTBUG_1665_closableChanged()

void tst_QDockWidget::taskQTBUG_9758_undockedGeometry()
{
if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
QSKIP("Fails on Wayland: QTBUG-91483");

QMainWindow window;
QDockWidget dock1(&window);
QDockWidget dock2(&window);
Expand Down Expand Up @@ -1461,8 +1456,6 @@ void tst_QDockWidget::createFloatingTabs(QMainWindow* &mainWindow, QPointer<QWid
// test floating tabs and item_tree consistency
void tst_QDockWidget::floatingTabs()
{
if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
QSKIP("Test skipped on Wayland.");
#ifdef Q_OS_WIN
QSKIP("Test skipped on Windows platforms");
#endif // Q_OS_WIN
Expand Down Expand Up @@ -1580,8 +1573,6 @@ void tst_QDockWidget::deleteFloatingTabWithSingleDockWidget_data()

void tst_QDockWidget::deleteFloatingTabWithSingleDockWidget()
{
if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
QSKIP("Test skipped on Wayland.");
#ifdef Q_OS_WIN
QSKIP("Test skipped on Windows platforms");
#endif // Q_OS_WIN
Expand Down

0 comments on commit 47ee855

Please sign in to comment.