diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-07-31 00:09:33 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-07-31 00:09:33 (GMT) |
commit | 8d9690cca4a13d4951b3d303eb57dbe4e25ce21c (patch) | |
tree | 29e53f5d03792cd87cbe1cf566a14cc74db010b0 /src/declarative/fx/qfxpathview.cpp | |
parent | 0ce2bedf9b5da9d480b994a9b812c37d1f5caa39 (diff) | |
download | Qt-8d9690cca4a13d4951b3d303eb57dbe4e25ce21c.zip Qt-8d9690cca4a13d4951b3d303eb57dbe4e25ce21c.tar.gz Qt-8d9690cca4a13d4951b3d303eb57dbe4e25ce21c.tar.bz2 |
More QFxItem cleanup.
Diffstat (limited to 'src/declarative/fx/qfxpathview.cpp')
-rw-r--r-- | src/declarative/fx/qfxpathview.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/declarative/fx/qfxpathview.cpp b/src/declarative/fx/qfxpathview.cpp index 98121e6..6546f69 100644 --- a/src/declarative/fx/qfxpathview.cpp +++ b/src/declarative/fx/qfxpathview.cpp @@ -496,7 +496,8 @@ bool QFxPathView::sendMouseEvent(QGraphicsSceneMouseEvent *event) Q_D(QFxPathView); QGraphicsSceneMouseEvent mouseEvent(event->type()); QRectF myRect = mapToScene(QRectF(0, 0, width(), height())).boundingRect(); - QFxItem *grabber = static_cast<QFxItem*>(mouseGrabberItem()); + QGraphicsScene *s = scene(); + QFxItem *grabber = s ? qobject_cast<QFxItem*>(s->mouseGrabberItem()) : 0; if ((d->stealMouse || myRect.contains(event->scenePos().toPoint())) && (!grabber || !grabber->keepMouseGrab())) { mouseEvent.setAccepted(false); for (int i = 0x1; i <= 0x10; i <<= 1) { @@ -523,7 +524,7 @@ bool QFxPathView::sendMouseEvent(QGraphicsSceneMouseEvent *event) default: break; } - grabber = static_cast<QFxItem*>(mouseGrabberItem()); + grabber = qobject_cast<QFxItem*>(s->mouseGrabberItem()); if (grabber && d->stealMouse && !grabber->keepMouseGrab() && grabber != this) grabMouse(); |