aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-05-24 08:57:40 +0200
committerLars Knoll <lars.knoll@qt.io>2018-05-24 09:15:57 +0200
commitb254bbb82b7d1b42950c4267d8e618b570f88cc6 (patch)
treec8f9fd1fcbd5c5d4a75ffea79ee623ce59e9ae9b /src/quick/items
parent1b0e6861ba7af231c29ebba10c93976845f7f78d (diff)
parent5b8a94eb8e5d4e3b79ab73a9a0325f838ecbe41a (diff)
Merge remote-tracking branch 'origin/5.11' into dev
Diffstat (limited to 'src/quick/items')
-rw-r--r--src/quick/items/context2d/qquickcontext2d.cpp2
-rw-r--r--src/quick/items/qquickevents.cpp10
-rw-r--r--src/quick/items/qquickitem.cpp5
3 files changed, 8 insertions, 9 deletions
diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp
index e01e87b45a..07d5f6d39b 100644
--- a/src/quick/items/context2d/qquickcontext2d.cpp
+++ b/src/quick/items/context2d/qquickcontext2d.cpp
@@ -1637,7 +1637,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_createRadialGradient(const
QV4::Scoped<QQuickContext2DStyle> gradient(scope, scope.engine->memoryManager->allocate<QQuickContext2DStyle>());
QV4::ScopedObject p(scope, ed->gradientProto.value());
gradient->setPrototype(p);
- *gradient->d()->brush = QRadialGradient(QPointF(x1, y1), r0+r1, QPointF(x0, y0));
+ *gradient->d()->brush = QRadialGradient(QPointF(x1, y1), r1, QPointF(x0, y0), r0);
RETURN_RESULT(*gradient);
}
diff --git a/src/quick/items/qquickevents.cpp b/src/quick/items/qquickevents.cpp
index d964f2bb32..d020ad7c4c 100644
--- a/src/quick/items/qquickevents.cpp
+++ b/src/quick/items/qquickevents.cpp
@@ -849,14 +849,16 @@ void QQuickEventPoint::setGrabberItem(QQuickItem *grabber)
qCDebug(lcPointerGrab) << pointDeviceName(this) << "point" << hex << m_pointId << pointStateString(this)
<< ": grab" << m_exclusiveGrabber << "->" << grabber;
}
+ QQuickItem *oldGrabberItem = grabberItem();
m_exclusiveGrabber = QPointer<QObject>(grabber);
m_grabberIsHandler = false;
m_sceneGrabPos = m_scenePos;
- QQuickItem *oldGrabberItem = grabberItem();
- if (oldGrabberHandler)
+ if (oldGrabberHandler) {
oldGrabberHandler->onGrabChanged(oldGrabberHandler, (grabber ? CancelGrabExclusive : UngrabExclusive), this);
- else if (oldGrabberItem && oldGrabberItem != grabber && grabber && pointerEvent()->asPointerTouchEvent())
- oldGrabberItem->touchUngrabEvent();
+ } else if (oldGrabberItem && oldGrabberItem != grabber && grabber && grabber->window()) {
+ QQuickWindowPrivate *windowPriv = QQuickWindowPrivate::get(grabber->window());
+ windowPriv->sendUngrabEvent(oldGrabberItem, windowPriv->isDeliveringTouchAsMouse());
+ }
for (QPointer<QQuickPointerHandler> passiveGrabber : m_passiveGrabbers)
passiveGrabber->onGrabChanged(passiveGrabber, OverrideGrabPassive, this);
}
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp
index f02ad24c5b..73fc12babd 100644
--- a/src/quick/items/qquickitem.cpp
+++ b/src/quick/items/qquickitem.cpp
@@ -7462,11 +7462,8 @@ void QQuickItem::grabMouse()
auto point = fromTouch ?
windowPriv->pointerEventInstance(windowPriv->touchMouseDevice)->pointById(windowPriv->touchMouseId) :
windowPriv->pointerEventInstance(QQuickPointerDevice::genericMouseDevice())->point(0);
- if (point) {
- QQuickItem *oldGrabber = point->grabberItem();
+ if (point)
point->setGrabberItem(this);
- windowPriv->sendUngrabEvent(oldGrabber, fromTouch);
- }
}
/*!