diff options
author | Alexander Volkov <a.volkov@rusbitech.ru> | 2015-04-22 18:43:33 +0300 |
---|---|---|
committer | Alexander Volkov <a.volkov@rusbitech.ru> | 2015-05-12 10:17:40 +0000 |
commit | 77e00909951f9274bccec20be950425ba9dbe744 (patch) | |
tree | d348e429407430b4e00e97d7d05e80c43decaf9d /src/widgets/graphicsview/qgraphicsproxywidget.cpp | |
parent | ac1b6c01454b8969e59becf066bba14f9ed0d310 (diff) |
QMouseEvent: add constructor which takes the source as a parameter
Simplify the code by passing the source of a mouse event
directly to the constructor instead of setting it by
QGuiApplicationPrivate::setMouseEventSource().
Change-Id: I1774cf39a211d36d3adf0ff30f3bd2fb7c5fb429
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src/widgets/graphicsview/qgraphicsproxywidget.cpp')
-rw-r--r-- | src/widgets/graphicsview/qgraphicsproxywidget.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/widgets/graphicsview/qgraphicsproxywidget.cpp b/src/widgets/graphicsview/qgraphicsproxywidget.cpp index db4d18299b..08ea1ea0e3 100644 --- a/src/widgets/graphicsview/qgraphicsproxywidget.cpp +++ b/src/widgets/graphicsview/qgraphicsproxywidget.cpp @@ -269,8 +269,7 @@ void QGraphicsProxyWidgetPrivate::sendWidgetMouseEvent(QGraphicsSceneMouseEvent // Send mouse event. QMouseEvent mouseEvent(type, pos, receiver->mapTo(receiver->topLevelWidget(), pos.toPoint()), receiver->mapToGlobal(pos.toPoint()), - event->button(), event->buttons(), event->modifiers()); - QGuiApplicationPrivate::setMouseEventSource(&mouseEvent, event->source()); + event->button(), event->buttons(), event->modifiers(), event->source()); QWidget *embeddedMouseGrabberPtr = (QWidget *)embeddedMouseGrabber; QApplicationPrivate::sendMouseEvent(receiver, &mouseEvent, alienWidget, widget, |