[neon/qt/qtdeclarative/Neon/release] debian: Backport one more patch to make the tests pass.

Dmitry Shachnev null at kde.org
Thu Jul 14 14:03:40 BST 2022


Git commit 76c5940a40486a830ae5048da42ce8e437b855e3 by Dmitry Shachnev.
Committed on 22/05/2022 at 21:25.
Pushed by jriddell into branch 'Neon/release'.

Backport one more patch to make the tests pass.

M  +1    -0    debian/changelog
M  +1    -0    debian/patches/series
A  +37   -0    debian/patches/use_delay_properly_in_mousewheel.patch

https://invent.kde.org/neon/qt/qtdeclarative/commit/76c5940a40486a830ae5048da42ce8e437b855e3

diff --git a/debian/changelog b/debian/changelog
index 9f06851..e10bac7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ qtdeclarative-opensource-src (5.15.4+dfsg-2) UNRELEASED; urgency=medium
   * Use symver directive to catch all private symbols at once.
   * Backport upstream patch to fix Flickable wheel velocity calculation
     (closes: #1011253, thanks Wolfgang Frisch).
+  * Backport one more patch to make the tests pass.
 
  -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Sun, 22 May 2022 00:35:13 +0300
 
diff --git a/debian/patches/series b/debian/patches/series
index 02be2a5..9cb5403 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,6 +4,7 @@ tst_qmldiskcache_big_endian.patch
 support_apos_in_styled_text.patch
 fix_sweep_step.patch
 fix_flickable_wheel_velocity_calculation.patch
+use_delay_properly_in_mousewheel.patch
 
 # Debian patches
 disableopengltests.patch
diff --git a/debian/patches/use_delay_properly_in_mousewheel.patch b/debian/patches/use_delay_properly_in_mousewheel.patch
new file mode 100644
index 0000000..1c1c7cf
--- /dev/null
+++ b/debian/patches/use_delay_properly_in_mousewheel.patch
@@ -0,0 +1,37 @@
+Description: QtTest: use delay properly in mouseWheel()
+Origin: upstream, https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=a7579771e35bfd73
+Last-Update: 2022-05-23
+
+--- a/src/imports/testlib/quicktestevent.cpp
++++ b/src/imports/testlib/quicktestevent.cpp
+@@ -231,8 +231,10 @@ namespace QtQuickTest
+         QTEST_ASSERT(item);
+         if (delay == -1 || delay < QTest::defaultMouseDelay())
+             delay = QTest::defaultMouseDelay();
+-        if (delay > 0)
++        if (delay > 0) {
+             QTest::qWait(delay);
++            lastMouseTimestamp += delay;
++        }
+ 
+         QPoint pos;
+         QQuickItem *sgitem = qobject_cast<QQuickItem *>(item);
+@@ -245,6 +247,7 @@ namespace QtQuickTest
+         stateKey &= static_cast<unsigned int>(Qt::KeyboardModifierMask);
+         QWheelEvent we(pos, window->mapToGlobal(pos), QPoint(0, 0), QPoint(xDelta, yDelta), buttons,
+                        stateKey, Qt::NoScrollPhase, false);
++        we.setTimestamp(++lastMouseTimestamp);
+ 
+         QSpontaneKeyEvent::setSpontaneous(&we); // hmmmm
+         if (!qApp->notify(window, &we))
+--- a/tests/auto/qmltest/events/tst_wheel.qml
++++ b/tests/auto/qmltest/events/tst_wheel.qml
+@@ -64,7 +64,7 @@ Rectangle {
+             verify(flick.contentX == 0);
+             flick.contentY = 0;
+             verify(flick.contentY == 0);
+-            mouseWheel(flick, 200, 200, -120, 0, Qt.NoButton, Qt.NoModifier, -1);
++            mouseWheel(flick, 200, 200, -120, 0, Qt.NoButton, Qt.NoModifier, 100);
+             wait(1000);
+             verify(flick.contentX > 0);
+             verify(flick.contentY == 0);



More information about the Neon-commits mailing list