From c38ece31d036cf2216392dda9c96736eabcb0f34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Thu, 18 Jun 2009 12:13:44 +0200 Subject: Compile on MSVC. The QtSVG module failed to link because it includes qgraphicsitem_p.h, which had an inlined function (updateHelper) that called an undeclared function (QGraphicViewPrivate::update(Region|Rect))...Resulting in unresolved symbols. Reviewed-by: MariusSO --- src/gui/graphicsview/qgraphicsitem_p.h | 8 -------- src/gui/graphicsview/qgraphicsscene.cpp | 18 ++++++++++++++---- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h index b7fb122..b9e7041 100644 --- a/src/gui/graphicsview/qgraphicsitem_p.h +++ b/src/gui/graphicsview/qgraphicsitem_p.h @@ -366,14 +366,6 @@ public: || (childrenCombineOpacity() && isFullyTransparent()); } - inline bool updateHelper(QGraphicsViewPrivate *view, const QRectF &rect, const QTransform &xform) const - { - Q_ASSERT(view); - if (hasBoundingRegionGranularity) - return view->updateRegion(xform.map(QRegion(rect.toRect()))); - return view->updateRect(xform.mapRect(rect).toRect()); - } - inline QTransform transformToParent() const; QPainterPath cachedClipPath; diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 15e8742..d9d31ef 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -5306,6 +5306,16 @@ void QGraphicsScenePrivate::markDirty(QGraphicsItem *item, const QRectF &rect, b } } +static inline bool updateHelper(QGraphicsViewPrivate *view, QGraphicsItemPrivate *item, + const QRectF &rect, const QTransform &xform) +{ + Q_ASSERT(view); + Q_ASSERT(item); + if (item->hasBoundingRegionGranularity) + return view->updateRegion(xform.map(QRegion(rect.toRect()))); + return view->updateRect(xform.mapRect(rect).toRect()); +} + void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool dirtyAncestorContainsChildren, qreal parentOpacity) { @@ -5401,14 +5411,14 @@ void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool bool valid = false; if (untransformableItem) { - valid = item->d_ptr->updateHelper(viewPrivate, dirtyRect, - item->deviceTransform(view->viewportTransform())); + valid = updateHelper(viewPrivate, item->d_ptr, dirtyRect, + item->deviceTransform(view->viewportTransform())); } else if (!view->isTransformed()) { - valid = item->d_ptr->updateHelper(viewPrivate, dirtyRect, item->d_ptr->sceneTransform); + valid = updateHelper(viewPrivate, item->d_ptr, dirtyRect, item->d_ptr->sceneTransform); } else { QTransform deviceTransform = item->d_ptr->sceneTransform; deviceTransform *= view->viewportTransform(); - valid = item->d_ptr->updateHelper(viewPrivate, dirtyRect, deviceTransform); + valid = updateHelper(viewPrivate, item->d_ptr, dirtyRect, deviceTransform); } if (!valid) paintedViewBoundingRect = QRect(); -- cgit v0.12