diff options
| author | Frederic Lefebvre <frederic.lefebvre@qt.io> | 2025-10-29 10:14:27 +0100 |
|---|---|---|
| committer | Frederic Lefebvre <frederic.lefebvre@qt.io> | 2025-11-13 11:21:16 +0000 |
| commit | c0c68c4be3afb9c00300037f87daf974f5567f4c (patch) | |
| tree | d8573c8034ccff78ce64870aa202fd3188efd932 /src/quicktestutils/quick/viewtestutils.cpp | |
| parent | 08c2223cf377a4f002d7e8c33722d6dd5395229d (diff) | |
QQuickView::showView() return true if the platform is Wayland
QQuickView::showView() return true if the platform is Wayland, this is
done before the position check. setPos and setFramePosition do not
work properly on Wayland causing all tests that are calling showView
to consistently fail due to this.
If the platform used is Wayland, showView return true before the
position check has been performed.
Fix the following failing tests: tst_HoverHandler::changeCursor,
tst_HoverHandler::deviceCursor,tst_HoverHandler::touchDrag
tst_HoverHandler::window
Change-Id: I18a4145643eb9cc76ce7fe55dd964904dcffa95e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quicktestutils/quick/viewtestutils.cpp')
| -rw-r--r-- | src/quicktestutils/quick/viewtestutils.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/quicktestutils/quick/viewtestutils.cpp b/src/quicktestutils/quick/viewtestutils.cpp index 6b4c9b02b3..1e45b5de64 100644 --- a/src/quicktestutils/quick/viewtestutils.cpp +++ b/src/quicktestutils/quick/viewtestutils.cpp @@ -505,6 +505,10 @@ namespace QQuickTest { } if (view.flags().testFlag(Qt::FramelessWindowHint)) return true; + if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive)) { + qWarning() << "Setting position is not supported on Wayland"; + return true; + } const bool positionOk = QTest::qWaitFor([&]{ return framePos != view.position(); }); if (!positionOk) { qCritical() << "Position failed to update"; |
