diff options
author | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-06-18 10:13:44 (GMT) |
---|---|---|
committer | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-06-18 10:17:47 (GMT) |
commit | c38ece31d036cf2216392dda9c96736eabcb0f34 (patch) | |
tree | 729534389b7b1acc433f1b2b69fcd1f829762ce0 /src | |
parent | a9e11b46bdcbc93d89078f0fcca1e7ac91975ffc (diff) | |
download | Qt-c38ece31d036cf2216392dda9c96736eabcb0f34.zip Qt-c38ece31d036cf2216392dda9c96736eabcb0f34.tar.gz Qt-c38ece31d036cf2216392dda9c96736eabcb0f34.tar.bz2 |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem_p.h | 8 | ||||
-rw-r--r-- | 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(); |