diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-09-24 10:27:36 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-09-24 23:09:23 +0200 |
commit | 21f9f02e9413c362be4c20d03f358ef1b5bc26c1 (patch) | |
tree | abf8ea7af70fa1911b0b103b506bcdfa84e8b8b6 /tests/auto | |
parent | 05dc0a387ae324f2d6f3d7e633a0a49473f6957a (diff) |
Stabilize tst_QQuickListView::parentBinding
Some platforms aren't registering their mouse devices yet, and we don't
want false failures in CI because of that, so just register a mouse,
even if it ends up being an extra one a lot of times.
Task-number: QTBUG-86729
Change-Id: Ia3a91e3d1e4fb8df90352555c9a7ec6ea18bf6fe
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/quick/qquicklistview/BLACKLIST | 2 | ||||
-rw-r--r-- | tests/auto/quick/qquicklistview/tst_qquicklistview.cpp | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/tests/auto/quick/qquicklistview/BLACKLIST b/tests/auto/quick/qquicklistview/BLACKLIST index 6e100ef319..6273398744 100644 --- a/tests/auto/quick/qquicklistview/BLACKLIST +++ b/tests/auto/quick/qquicklistview/BLACKLIST @@ -14,5 +14,3 @@ opensuse-leap ubuntu-18.04 [touchCancel] * # QTBUG-86729 -[parentBinding] -* # QTBUG-86729 diff --git a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp index 4f504103d4..132c42ec1f 100644 --- a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp +++ b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp @@ -45,6 +45,7 @@ #include <QtQmlModels/private/qqmlobjectmodel_p.h> #include <QtQmlModels/private/qqmllistmodel_p.h> #include <QtQmlModels/private/qqmldelegatemodel_p.h> +#include <qpa/qwindowsysteminterface.h> #include "../../shared/util.h" #include "../shared/viewtestutil.h" #include "../shared/visualtestutil.h" @@ -8068,6 +8069,13 @@ void tst_QQuickListView::destroyItemOnCreation() void tst_QQuickListView::parentBinding() { + // Ensure there's at least one mouse on every platform, to avoid the messageHandler seeing "no mouse-like devices registered" + QScopedPointer<QPointingDevice> fallbackMouse( + new QPointingDevice("test mouse", 1000, QInputDevice::DeviceType::Mouse, QPointingDevice::PointerType::Generic, + QInputDevice::Capability::Position | QInputDevice::Capability::Hover | QInputDevice::Capability::Scroll, + 1, 5, QString(), QPointingDeviceUniqueId(), this)); + QWindowSystemInterface::registerInputDevice(fallbackMouse.data()); + QScopedPointer<QQuickView> window(createView()); QQmlTestMessageHandler messageHandler; |