diff options
Diffstat (limited to 'src/gui/graphicsview/qgraphicsscene.cpp')
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index c80b314..034d1f7 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** @@ -1132,8 +1132,9 @@ bool QGraphicsScenePrivate::filterEvent(QGraphicsItem *item, QEvent *event) bool QGraphicsScenePrivate::sendEvent(QGraphicsItem *item, QEvent *event) { if (QGraphicsObject *object = item->toGraphicsObject()) { - if (qt_gestureManager) { - if (qt_gestureManager->filterEvent(object, event)) + QGestureManager *gestureManager = QApplicationPrivate::instance()->gestureManager; + if (gestureManager) { + if (gestureManager->filterEvent(object, event)) return true; } } @@ -5095,6 +5096,10 @@ void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool \snippet doc/src/snippets/graphicssceneadditemsnippet.cpp 0 + \obsolete Since Qt 4.6, this function is not called anymore unless + the QGraphicsView::IndirectPainting flag is given as an Optimization + flag. + \sa drawBackground(), drawForeground() */ void QGraphicsScene::drawItems(QPainter *painter, @@ -6148,9 +6153,10 @@ void QGraphicsScenePrivate::cancelGesturesForChildren(QGesture *original, QWidge } } - Q_ASSERT(qt_gestureManager); // it would be very odd if we got called without a manager. + QGestureManager *gestureManager = QApplicationPrivate::instance()->gestureManager; + Q_ASSERT(gestureManager); // it would be very odd if we got called without a manager. for (setIter = canceledGestures.begin(); setIter != canceledGestures.end(); ++setIter) { - qt_gestureManager->recycle(*setIter); + gestureManager->recycle(*setIter); gestureTargets.remove(*setIter); } } |