[SCM] qtdeclarative packaging branch, ubuntu+1, updated. ubuntu/5.6.1-4ubuntu1-1-gfd32e09
Timo Jyrinki
timo at moszumanska.debian.org
Tue Aug 9 08:54:41 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/qt/qtdeclarative.git;a=commitdiff;h=fd32e09
The following commit has been merged in the ubuntu+1 branch:
commit fd32e099868656328b0e09fca8d8247f07a1f0d1
Author: Timo Jyrinki <timo.jyrinki at canonical.com>
Date: Tue Aug 9 08:53:52 2016 +0000
Fix flickable width/heightRatios, fix relative mouse events.
* debian/patches/Flickable-fix-minXExtent-minYExtent-when-content-is-.patch:
- Fix flickable's widthRatio and heightRatio (LP: #1588238)
* debian/patches/QQuickWindow-Fill-out-timestamps-in-QHoverEvents-sen.patch:
- Fix relative mouse events (LP: #1597205)
- debian/libqt5quick5.symbols: Update symbols.
---
debian/changelog | 10 +
debian/libqt5quick5.symbols | 6 +-
...ix-minXExtent-minYExtent-when-content-is-.patch | 120 ++++++++++
...w-Fill-out-timestamps-in-QHoverEvents-sen.patch | 261 +++++++++++++++++++++
debian/patches/series | 2 +
5 files changed, 396 insertions(+), 3 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index dea0054..22eca5e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+qtdeclarative-opensource-src (5.6.1-4ubuntu2) yakkety; urgency=medium
+
+ * debian/patches/Flickable-fix-minXExtent-minYExtent-when-content-is-.patch:
+ - Fix flickable's widthRatio and heightRatio (LP: #1588238)
+ * debian/patches/QQuickWindow-Fill-out-timestamps-in-QHoverEvents-sen.patch:
+ - Fix relative mouse events (LP: #1597205)
+ - debian/libqt5quick5.symbols: Update symbols.
+
+ -- Timo Jyrinki <timo-jyrinki at ubuntu.com> Wed, 27 Jul 2016 12:11:13 +0000
+
qtdeclarative-opensource-src (5.6.1-4ubuntu1~4) yakkety; urgency=medium
* Merge with Debian.
diff --git a/debian/libqt5quick5.symbols b/debian/libqt5quick5.symbols
index a7f1f6c..7d5fda9 100644
--- a/debian/libqt5quick5.symbols
+++ b/debian/libqt5quick5.symbols
@@ -1701,7 +1701,7 @@ libQt5Quick.so.5 libqt5quick5 #MINVER# | libqt5quick5-gles #MINVER#
_ZN19QQuickScaleAnimator16staticMetaObjectE at Qt_5_PRIVATE_API 5.2.0~beta1 1
_ZN19QQuickScaleAnimatorC1EP7QObject at Qt_5_PRIVATE_API 5.2.0~beta1 1
_ZN19QQuickScaleAnimatorC2EP7QObject at Qt_5_PRIVATE_API 5.2.0~beta1 1
- _ZN19QQuickWindowPrivate10clearHoverEv at Qt_5_PRIVATE_API 5.0.2 1
+ _ZN19QQuickWindowPrivate10clearHoverEm at Qt_5_PRIVATE_API 5.6.1-4ubuntu2~1 1
_ZN19QQuickWindowPrivate10data_clearEP16QQmlListPropertyI7QObjectE at Qt_5_PRIVATE_API 5.1.0 1
_ZN19QQuickWindowPrivate10data_countEP16QQmlListPropertyI7QObjectE at Qt_5_PRIVATE_API 5.1.0 1
_ZN19QQuickWindowPrivate11data_appendEP16QQmlListPropertyI7QObjectEPS1_ at Qt_5_PRIVATE_API 5.1.0 1
@@ -1710,7 +1710,7 @@ libQt5Quick.so.5 libqt5quick5 #MINVER# | libqt5quick5-gles #MINVER#
_ZN19QQuickWindowPrivate12cleanupNodesEv at Qt_5_PRIVATE_API 5.0.2 1
_ZN19QQuickWindowPrivate12updateCursorERK7QPointF at Qt_5_PRIVATE_API 5.0.2 1
_ZN19QQuickWindowPrivate14findCursorItemEP10QQuickItemRK7QPointF at Qt_5_PRIVATE_API 5.0.2 1
- _ZN19QQuickWindowPrivate14sendHoverEventEN6QEvent4TypeEP10QQuickItemRK7QPointFS6_6QFlagsIN2Qt16KeyboardModifierEEb at Qt_5_PRIVATE_API 5.0.2 1
+ _ZN19QQuickWindowPrivate14sendHoverEventEN6QEvent4TypeEP10QQuickItemRK7QPointFS6_6QFlagsIN2Qt16KeyboardModifierEEmb at Qt_5_PRIVATE_API 5.6.1-4ubuntu2~1 1
_ZN19QQuickWindowPrivate14syncSceneGraphEv at Qt_5_PRIVATE_API 5.0.2 1
_ZN19QQuickWindowPrivate15cloneMouseEventEP11QMouseEventP7QPointF at Qt_5_PRIVATE_API 5.0.2 1
_ZN19QQuickWindowPrivate15deliverKeyEventEP9QKeyEvent at Qt_5_PRIVATE_API 5.3.0 1
@@ -1724,7 +1724,7 @@ libQt5Quick.so.5 libqt5quick5 #MINVER# | libqt5quick5-gles #MINVER#
_ZN19QQuickWindowPrivate16renderSceneGraphERK5QSize at Qt_5_PRIVATE_API 5.0.2 1
_ZN19QQuickWindowPrivate16updateDirtyNodesEv at Qt_5_PRIVATE_API 5.0.2 1
_ZN19QQuickWindowPrivate17clearFocusInScopeEP10QQuickItemS1_N2Qt11FocusReasonE6QFlagsINS_11FocusOptionEE at Qt_5_PRIVATE_API 5.1.0 1
- _ZN19QQuickWindowPrivate17deliverHoverEventEP10QQuickItemRK7QPointFS4_6QFlagsIN2Qt16KeyboardModifierEERb at Qt_5_PRIVATE_API 5.0.2 1
+ _ZN19QQuickWindowPrivate17deliverHoverEventEP10QQuickItemRK7QPointFS4_6QFlagsIN2Qt16KeyboardModifierEEmRb at Qt_5_PRIVATE_API 5.6.1-4ubuntu2~1 1
_ZN19QQuickWindowPrivate17deliverMouseEventEP11QMouseEvent at Qt_5_PRIVATE_API 5.0.2 1
_ZN19QQuickWindowPrivate17deliverTouchEventEP11QTouchEvent at Qt_5_PRIVATE_API 5.0.2 1
_ZN19QQuickWindowPrivate17deliverWheelEventEP10QQuickItemP11QWheelEvent at Qt_5_PRIVATE_API 5.0.2 1
diff --git a/debian/patches/Flickable-fix-minXExtent-minYExtent-when-content-is-.patch b/debian/patches/Flickable-fix-minXExtent-minYExtent-when-content-is-.patch
new file mode 100644
index 0000000..b8708ac
--- /dev/null
+++ b/debian/patches/Flickable-fix-minXExtent-minYExtent-when-content-is-.patch
@@ -0,0 +1,120 @@
+From 67779215fc919075709d2072e412551b3e126a3d Mon Sep 17 00:00:00 2001
+From: Andrea Bernabei <and.bernabei at gmail.com>
+Date: Tue, 31 May 2016 14:21:44 +0100
+Subject: [PATCH] Flickable: fix minXExtent/minYExtent when content is smaller
+ than view
+
+At the moment, defining leftMargin (or topMargin) and contentWidth
+(or contentHeight) so that "leftMargin+contentWidth < flickable.width"
+(or topMargin+contentHeight < flickable.height) leads to widthRatio
+(or heightRatio) having value != 1.
+The value should, however, be 1, as the content is completely visible
+inside the view, margins included.
+
+As a sideeffect, under the assumptions described above, it will now
+not be possible to scroll the leftMargin (or topMargin) out of screen,
+something which was possible (and it shouldn't have) before this fix.
+
+Task-number: QTBUG-53726
+Change-Id: I22426c8038e90a2cfc7445914206eae0e781a3fb
+---
+ src/quick/items/qquickflickable.cpp | 4 ++--
+ .../qquickflickable/data/ratios_smallContent.qml | 19 +++++++++++++++
+ .../quick/qquickflickable/tst_qquickflickable.cpp | 28 ++++++++++++++++++++++
+ 3 files changed, 49 insertions(+), 2 deletions(-)
+ create mode 100644 tests/auto/quick/qquickflickable/data/ratios_smallContent.qml
+
+diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp
+index 32d445d..b0980cd 100644
+--- a/src/quick/items/qquickflickable.cpp
++++ b/src/quick/items/qquickflickable.cpp
+@@ -1580,13 +1580,13 @@ qreal QQuickFlickable::minXExtent() const
+ qreal QQuickFlickable::maxXExtent() const
+ {
+ Q_D(const QQuickFlickable);
+- return qMin<qreal>(0, width() - vWidth() - d->hData.endMargin);
++ return qMin<qreal>(minXExtent(), width() - vWidth() - d->hData.endMargin);
+ }
+ /* returns -ve */
+ qreal QQuickFlickable::maxYExtent() const
+ {
+ Q_D(const QQuickFlickable);
+- return qMin<qreal>(0, height() - vHeight() - d->vData.endMargin);
++ return qMin<qreal>(minYExtent(), height() - vHeight() - d->vData.endMargin);
+ }
+
+ void QQuickFlickable::componentComplete()
+diff --git a/tests/auto/quick/qquickflickable/data/ratios_smallContent.qml b/tests/auto/quick/qquickflickable/data/ratios_smallContent.qml
+new file mode 100644
+index 0000000..07bad68
+--- /dev/null
++++ b/tests/auto/quick/qquickflickable/data/ratios_smallContent.qml
+@@ -0,0 +1,19 @@
++import QtQuick 2.0
++
++Flickable {
++ property double heightRatioIs: visibleArea.heightRatio
++ property double widthRatioIs: visibleArea.widthRatio
++
++ width: 200
++ height: 200
++ contentWidth: item.width
++ contentHeight: item.height
++ topMargin: 20
++ leftMargin: 40
++
++ Item {
++ id: item
++ width: 100
++ height: 100
++ }
++}
+diff --git a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
+index dc71717..2e134ff 100644
+--- a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
++++ b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
+@@ -95,6 +95,7 @@ private slots:
+ void movementFromProgrammaticFlick();
+ void cleanup();
+ void contentSize();
++ void ratios_smallContent();
+
+ private:
+ void flickWithTouch(QQuickWindow *window, QTouchDevice *touchDevice, const QPoint &from, const QPoint &to);
+@@ -1817,6 +1818,33 @@ void tst_qquickflickable::contentSize()
+ QCOMPARE(chspy.count(), 1);
+ }
+
++// QTBUG-53726
++void tst_qquickflickable::ratios_smallContent()
++{
++ QScopedPointer<QQuickView> window(new QQuickView);
++ window->setSource(testFileUrl("ratios_smallContent.qml"));
++ QTRY_COMPARE(window->status(), QQuickView::Ready);
++ QQuickViewTestUtil::centerOnScreen(window.data());
++ QQuickViewTestUtil::moveMouseAway(window.data());
++ window->setTitle(QTest::currentTestFunction());
++ window->show();
++ QVERIFY(QTest::qWaitForWindowExposed(window.data()));
++ QQuickItem *root = window->rootObject();
++ QVERIFY(root);
++ QQuickFlickable *obj = qobject_cast<QQuickFlickable*>(root);
++ QVERIFY(obj != 0);
++
++ //doublecheck the item, as specified by contentWidth/Height, fits in the view
++ //use tryCompare to allow a bit of stabilization in component's properties
++ QTRY_COMPARE(obj->leftMargin() + obj->contentWidth() + obj->rightMargin() <= obj->width(), true);
++ QTRY_COMPARE(obj->topMargin() + obj->contentHeight() + obj->bottomMargin() <= obj->height(), true);
++
++ //the whole item fits in the flickable, heightRatio should be 1
++ QCOMPARE(obj->property("heightRatioIs").toDouble(), 1.);
++ QCOMPARE(obj->property("widthRatioIs").toDouble(), 1.);
++}
++
++
+ QTEST_MAIN(tst_qquickflickable)
+
+ #include "tst_qquickflickable.moc"
+--
+2.7.4
+
diff --git a/debian/patches/QQuickWindow-Fill-out-timestamps-in-QHoverEvents-sen.patch b/debian/patches/QQuickWindow-Fill-out-timestamps-in-QHoverEvents-sen.patch
new file mode 100644
index 0000000..e5de93d
--- /dev/null
+++ b/debian/patches/QQuickWindow-Fill-out-timestamps-in-QHoverEvents-sen.patch
@@ -0,0 +1,261 @@
+From e4f7ab42c6c4f19eed76d9d0de5accda5835a3a8 Mon Sep 17 00:00:00 2001
+From: Daniel d'Andrada <daniel.dandrada at canonical.com>
+Date: Wed, 6 Jul 2016 17:01:35 -0300
+Subject: [PATCH] QQuickWindow: Fill out timestamps in QHoverEvents sent to
+ QQuickItems
+
+Task-number: QTBUG-54600
+Change-Id: Ie24c44e2f68aae55ff1146c13c3dfc25349b7a29
+Reviewed-by: Frederik Gladhorn <frederik.gladhorn at qt.io>
+Reviewed-by: Robin Burchell <robin.burchell at viroteck.net>
+Reviewed-by: Shawn Rutledge <shawn.rutledge at qt.io>
+---
+ src/quick/items/qquickwindow.cpp | 28 +++----
+ src/quick/items/qquickwindow_p.h | 6 +-
+ tests/auto/quick/qquickwindow/tst_qquickwindow.cpp | 85 ++++++++++++++++++++++
+ 3 files changed, 103 insertions(+), 16 deletions(-)
+
+diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
+index 14e7915..de1b5f2 100644
+--- a/src/quick/items/qquickwindow.cpp
++++ b/src/quick/items/qquickwindow.cpp
+@@ -661,10 +661,10 @@ bool QQuickWindowPrivate::translateTouchToMouse(QQuickItem *item, QTouchEvent *e
+ lastMousePosition = me->windowPos();
+
+ bool accepted = me->isAccepted();
+- bool delivered = deliverHoverEvent(contentItem, me->windowPos(), last, me->modifiers(), accepted);
++ bool delivered = deliverHoverEvent(contentItem, me->windowPos(), last, me->modifiers(), me->timestamp(), accepted);
+ if (!delivered) {
+ //take care of any exits
+- accepted = clearHover();
++ accepted = clearHover(me->timestamp());
+ }
+ me->setAccepted(accepted);
+ break;
+@@ -1397,7 +1397,7 @@ QQuickItem *QQuickWindow::mouseGrabberItem() const
+ }
+
+
+-bool QQuickWindowPrivate::clearHover()
++bool QQuickWindowPrivate::clearHover(ulong timestamp)
+ {
+ Q_Q(QQuickWindow);
+ if (hoverItems.isEmpty())
+@@ -1407,7 +1407,7 @@ bool QQuickWindowPrivate::clearHover()
+
+ bool accepted = false;
+ foreach (QQuickItem* item, hoverItems)
+- accepted = sendHoverEvent(QEvent::HoverLeave, item, pos, pos, QGuiApplication::keyboardModifiers(), true) || accepted;
++ accepted = sendHoverEvent(QEvent::HoverLeave, item, pos, pos, QGuiApplication::keyboardModifiers(), timestamp, true) || accepted;
+ hoverItems.clear();
+ return accepted;
+ }
+@@ -1657,13 +1657,15 @@ void QQuickWindow::mouseDoubleClickEvent(QMouseEvent *event)
+
+ bool QQuickWindowPrivate::sendHoverEvent(QEvent::Type type, QQuickItem *item,
+ const QPointF &scenePos, const QPointF &lastScenePos,
+- Qt::KeyboardModifiers modifiers, bool accepted)
++ Qt::KeyboardModifiers modifiers, ulong timestamp,
++ bool accepted)
+ {
+ Q_Q(QQuickWindow);
+ const QTransform transform = QQuickItemPrivate::get(item)->windowToItemTransform();
+
+ //create copy of event
+ QHoverEvent hoverEvent(type, transform.map(scenePos), transform.map(lastScenePos), modifiers);
++ hoverEvent.setTimestamp(timestamp);
+ hoverEvent.setAccepted(accepted);
+
+ QSet<QQuickItem *> hasFiltered;
+@@ -1699,10 +1701,10 @@ void QQuickWindow::mouseMoveEvent(QMouseEvent *event)
+ d->lastMousePosition = event->windowPos();
+
+ bool accepted = event->isAccepted();
+- bool delivered = d->deliverHoverEvent(d->contentItem, event->windowPos(), last, event->modifiers(), accepted);
++ bool delivered = d->deliverHoverEvent(d->contentItem, event->windowPos(), last, event->modifiers(), event->timestamp(), accepted);
+ if (!delivered) {
+ //take care of any exits
+- accepted = d->clearHover();
++ accepted = d->clearHover(event->timestamp());
+ }
+ event->setAccepted(accepted);
+ return;
+@@ -1712,7 +1714,7 @@ void QQuickWindow::mouseMoveEvent(QMouseEvent *event)
+ }
+
+ bool QQuickWindowPrivate::deliverHoverEvent(QQuickItem *item, const QPointF &scenePos, const QPointF &lastScenePos,
+- Qt::KeyboardModifiers modifiers, bool &accepted)
++ Qt::KeyboardModifiers modifiers, ulong timestamp, bool &accepted)
+ {
+ Q_Q(QQuickWindow);
+ QQuickItemPrivate *itemPrivate = QQuickItemPrivate::get(item);
+@@ -1728,7 +1730,7 @@ bool QQuickWindowPrivate::deliverHoverEvent(QQuickItem *item, const QPointF &sce
+ QQuickItem *child = children.at(ii);
+ if (!child->isVisible() || !child->isEnabled() || QQuickItemPrivate::get(child)->culled)
+ continue;
+- if (deliverHoverEvent(child, scenePos, lastScenePos, modifiers, accepted))
++ if (deliverHoverEvent(child, scenePos, lastScenePos, modifiers, timestamp, accepted))
+ return true;
+ }
+
+@@ -1737,7 +1739,7 @@ bool QQuickWindowPrivate::deliverHoverEvent(QQuickItem *item, const QPointF &sce
+ if (item->contains(p)) {
+ if (!hoverItems.isEmpty() && hoverItems[0] == item) {
+ //move
+- accepted = sendHoverEvent(QEvent::HoverMove, item, scenePos, lastScenePos, modifiers, accepted);
++ accepted = sendHoverEvent(QEvent::HoverMove, item, scenePos, lastScenePos, modifiers, timestamp, accepted);
+ } else {
+ QList<QQuickItem *> itemsToHover;
+ QQuickItem* parent = item;
+@@ -1748,12 +1750,12 @@ bool QQuickWindowPrivate::deliverHoverEvent(QQuickItem *item, const QPointF &sce
+ // Leaving from previous hovered items until we reach the item or one of its ancestors.
+ while (!hoverItems.isEmpty() && !itemsToHover.contains(hoverItems[0])) {
+ QQuickItem *hoverLeaveItem = hoverItems.takeFirst();
+- sendHoverEvent(QEvent::HoverLeave, hoverLeaveItem, scenePos, lastScenePos, modifiers, accepted);
++ sendHoverEvent(QEvent::HoverLeave, hoverLeaveItem, scenePos, lastScenePos, modifiers, timestamp, accepted);
+ }
+
+ if (!hoverItems.isEmpty() && hoverItems[0] == item){//Not entering a new Item
+ // ### Shouldn't we send moves for the parent items as well?
+- accepted = sendHoverEvent(QEvent::HoverMove, item, scenePos, lastScenePos, modifiers, accepted);
++ accepted = sendHoverEvent(QEvent::HoverMove, item, scenePos, lastScenePos, modifiers, timestamp, accepted);
+ } else {
+ // Enter items that are not entered yet.
+ int startIdx = -1;
+@@ -1772,7 +1774,7 @@ bool QQuickWindowPrivate::deliverHoverEvent(QQuickItem *item, const QPointF &sce
+ // itemToHoverPrivate->window here prevents that case.
+ if (itemToHoverPrivate->window == q && itemToHoverPrivate->hoverEnabled) {
+ hoverItems.prepend(itemToHover);
+- sendHoverEvent(QEvent::HoverEnter, itemToHover, scenePos, lastScenePos, modifiers, accepted);
++ sendHoverEvent(QEvent::HoverEnter, itemToHover, scenePos, lastScenePos, modifiers, timestamp, accepted);
+ }
+ }
+ }
+diff --git a/src/quick/items/qquickwindow_p.h b/src/quick/items/qquickwindow_p.h
+index 33aa021..be7252d 100644
+--- a/src/quick/items/qquickwindow_p.h
++++ b/src/quick/items/qquickwindow_p.h
+@@ -155,14 +155,14 @@ public:
+ bool deliverTouchCancelEvent(QTouchEvent *);
+ void deliverDelayedTouchEvent();
+ void flushDelayedTouchEvent();
+- bool deliverHoverEvent(QQuickItem *, const QPointF &scenePos, const QPointF &lastScenePos, Qt::KeyboardModifiers modifiers, bool &accepted);
++ bool deliverHoverEvent(QQuickItem *, const QPointF &scenePos, const QPointF &lastScenePos, Qt::KeyboardModifiers modifiers, ulong timestamp, bool &accepted);
+ bool deliverMatchingPointsToItem(QQuickItem *item, QTouchEvent *event, QSet<int> *acceptedNewPoints, const QSet<int> &matchingNewPoints, const QList<QTouchEvent::TouchPoint> &matchingPoints, QSet<QQuickItem*> *filtered);
+ QTouchEvent *touchEventForItemBounds(QQuickItem *target, const QTouchEvent &originalEvent);
+ QTouchEvent *touchEventWithPoints(const QTouchEvent &event, const QList<QTouchEvent::TouchPoint> &newPoints);
+ bool sendFilteredTouchEvent(QQuickItem *target, QQuickItem *item, QTouchEvent *event, QSet<QQuickItem*> *filtered);
+ bool sendHoverEvent(QEvent::Type, QQuickItem *, const QPointF &scenePos, const QPointF &lastScenePos,
+- Qt::KeyboardModifiers modifiers, bool accepted);
+- bool clearHover();
++ Qt::KeyboardModifiers modifiers, ulong timestamp, bool accepted);
++ bool clearHover(ulong timestamp = 0);
+ #ifndef QT_NO_DRAGANDDROP
+ void deliverDragEvent(QQuickDragGrabber *, QEvent *);
+ bool deliverDragEvent(QQuickDragGrabber *, QQuickItem *, QDragMoveEvent *);
+diff --git a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
+index c597cf0..b03cb85 100644
+--- a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
++++ b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
+@@ -371,6 +371,7 @@ private slots:
+ void testRenderJob();
+
+ void testHoverChildMouseEventFilter();
++ void testHoverTimestamp();
+ private:
+ QTouchDevice *touchDevice;
+ QTouchDevice *touchDeviceWithVelocity;
+@@ -2282,6 +2283,90 @@ void tst_qquickwindow::testHoverChildMouseEventFilter()
+ QCOMPARE(middleItem->eventCount(QEvent::HoverEnter), 0);
+ }
+
++class HoverTimestampConsumer : public QQuickItem
++{
++ Q_OBJECT
++public:
++ HoverTimestampConsumer(QQuickItem *parent = 0)
++ : QQuickItem(parent)
++ {
++ setAcceptHoverEvents(true);
++ }
++
++ void hoverEnterEvent(QHoverEvent *event) { hoverTimestamps << event->timestamp(); }
++ void hoverLeaveEvent(QHoverEvent *event) { hoverTimestamps << event->timestamp(); }
++ void hoverMoveEvent(QHoverEvent *event) { hoverTimestamps << event->timestamp(); }
++
++ QList<ulong> hoverTimestamps;
++};
++
++// Checks that a QHoverEvent carries the timestamp of the QMouseEvent that caused it.
++// QTBUG-54600
++void tst_qquickwindow::testHoverTimestamp()
++{
++ QQuickWindow window;
++
++ window.resize(200, 200);
++ window.setPosition(100, 100);
++ window.setTitle(QTest::currentTestFunction());
++ window.show();
++ QVERIFY(QTest::qWaitForWindowActive(&window));
++
++ HoverTimestampConsumer *hoverConsumer = new HoverTimestampConsumer(window.contentItem());
++ hoverConsumer->setWidth(100);
++ hoverConsumer->setHeight(100);
++ hoverConsumer->setX(50);
++ hoverConsumer->setY(50);
++
++ // First position, outside
++ {
++ QMouseEvent mouseEvent(QEvent::MouseMove, QPointF(40, 40), QPointF(40, 40), QPointF(140, 140),
++ Qt::NoButton, Qt::NoButton, Qt::NoModifier, Qt::MouseEventNotSynthesized);
++ mouseEvent.setTimestamp(10);
++ QVERIFY(QCoreApplication::sendEvent(&window, &mouseEvent));
++ }
++
++ // Enter
++ {
++ QMouseEvent mouseEvent(QEvent::MouseMove, QPointF(50, 50), QPointF(50, 50), QPointF(150, 150),
++ Qt::NoButton, Qt::NoButton, Qt::NoModifier, Qt::MouseEventNotSynthesized);
++ mouseEvent.setTimestamp(20);
++ QVERIFY(QCoreApplication::sendEvent(&window, &mouseEvent));
++ }
++ QCOMPARE(hoverConsumer->hoverTimestamps.size(), 1);
++ QCOMPARE(hoverConsumer->hoverTimestamps.last(), 20UL);
++
++ // Move
++ {
++ QMouseEvent mouseEvent(QEvent::MouseMove, QPointF(60, 60), QPointF(60, 60), QPointF(160, 160),
++ Qt::NoButton, Qt::NoButton, Qt::NoModifier, Qt::MouseEventNotSynthesized);
++ mouseEvent.setTimestamp(30);
++ QVERIFY(QCoreApplication::sendEvent(&window, &mouseEvent));
++ }
++ QCOMPARE(hoverConsumer->hoverTimestamps.size(), 2);
++ QCOMPARE(hoverConsumer->hoverTimestamps.last(), 30UL);
++
++ // Move
++ {
++ QMouseEvent mouseEvent(QEvent::MouseMove, QPointF(100, 100), QPointF(100, 100), QPointF(200, 200),
++ Qt::NoButton, Qt::NoButton, Qt::NoModifier, Qt::MouseEventNotSynthesized);
++ mouseEvent.setTimestamp(40);
++ QVERIFY(QCoreApplication::sendEvent(&window, &mouseEvent));
++ }
++ QCOMPARE(hoverConsumer->hoverTimestamps.size(), 3);
++ QCOMPARE(hoverConsumer->hoverTimestamps.last(), 40UL);
++
++ // Leave
++ {
++ QMouseEvent mouseEvent(QEvent::MouseMove, QPointF(160, 160), QPointF(160, 160), QPointF(260, 260),
++ Qt::NoButton, Qt::NoButton, Qt::NoModifier, Qt::MouseEventNotSynthesized);
++ mouseEvent.setTimestamp(5);
++ QVERIFY(QCoreApplication::sendEvent(&window, &mouseEvent));
++ }
++ QCOMPARE(hoverConsumer->hoverTimestamps.size(), 4);
++ QCOMPARE(hoverConsumer->hoverTimestamps.last(), 5UL);
++}
++
+ QTEST_MAIN(tst_qquickwindow)
+
+ #include "tst_qquickwindow.moc"
+--
+2.8.1
+
diff --git a/debian/patches/series b/debian/patches/series
index cf60c0e..f230c45 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,6 +3,8 @@ QQuickItemView-forceLayout-Also-call-layout-when-d-f.patch
qml_only_release_types_if_they_arent_referenced_anymore.patch
V4-Always-set-the-tag-when-boxing-a-pointer-in-QV4-V.patch
Fix-QQmlEngine-crash-on-big-endian-64-bit-architectu.patch
+Flickable-fix-minXExtent-minYExtent-when-content-is-.patch
+QQuickWindow-Fill-out-timestamps-in-QHoverEvents-sen.patch
# Debian patches
check_system_double-conversion.patch
--
qtdeclarative packaging
More information about the pkg-kde-commits
mailing list