diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-04-20 13:47:03 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2017-04-21 08:35:07 +0000 |
commit | 7c65f4f7e6167b868e3357d85dabe19e68f3c1b6 (patch) | |
tree | d53bbb1959214d0e2b95dfce0eb979dff8f11139 | |
parent | be10b714ca2233e3312383a91e6d33da31176ae1 (diff) |
QQuickDrawerPrivate::startDrag(): remove superfluous argument
Popups used to have a valid window-pointer only when they were visible,
but now the window is automatically looked up from the parent item.
There is no need to pass the window pointer from the overlay anymore,
because the drawer already knows the window.
Change-Id: I9652607217a82af2be89f6ab4490431556e3d17c
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
-rw-r--r-- | src/quicktemplates2/qquickdrawer.cpp | 2 | ||||
-rw-r--r-- | src/quicktemplates2/qquickdrawer_p_p.h | 2 | ||||
-rw-r--r-- | src/quicktemplates2/qquickoverlay.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/quicktemplates2/qquickdrawer.cpp b/src/quicktemplates2/qquickdrawer.cpp index a149eb54..e848c160 100644 --- a/src/quicktemplates2/qquickdrawer.cpp +++ b/src/quicktemplates2/qquickdrawer.cpp @@ -239,7 +239,7 @@ static bool dragOverThreshold(qreal d, Qt::Axis axis, QMouseEvent *event, int th return QQuickWindowPrivate::dragOverThreshold(d, axis, event, threshold); } -bool QQuickDrawerPrivate::startDrag(QQuickWindow *window, QMouseEvent *event) +bool QQuickDrawerPrivate::startDrag(QMouseEvent *event) { if (!window || !interactive || dragMargin < 0.0 || qFuzzyIsNull(dragMargin)) return false; diff --git a/src/quicktemplates2/qquickdrawer_p_p.h b/src/quicktemplates2/qquickdrawer_p_p.h index ae873602..388e926b 100644 --- a/src/quicktemplates2/qquickdrawer_p_p.h +++ b/src/quicktemplates2/qquickdrawer_p_p.h @@ -70,7 +70,7 @@ public: void reposition() override; void resizeOverlay() override; - bool startDrag(QQuickWindow *window, QMouseEvent *event); + bool startDrag(QMouseEvent *event); bool grabMouse(QMouseEvent *event); bool ungrabMouse(QMouseEvent *event); diff --git a/src/quicktemplates2/qquickoverlay.cpp b/src/quicktemplates2/qquickoverlay.cpp index d31186cd..cba87849 100644 --- a/src/quicktemplates2/qquickoverlay.cpp +++ b/src/quicktemplates2/qquickoverlay.cpp @@ -338,7 +338,7 @@ void QQuickOverlay::mousePressEvent(QMouseEvent *event) const QVector<QQuickDrawer *> drawers = d->stackingOrderDrawers(); for (QQuickDrawer *drawer : drawers) { QQuickDrawerPrivate *p = QQuickDrawerPrivate::get(drawer); - if (p->startDrag(window(), event)) { + if (p->startDrag(event)) { d->setMouseGrabberPopup(drawer); return; } |