remove unused QGraphicsItemPrivate methods arguments

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2023-10-21 12:30:12 +03:00
parent dc84af4866
commit 9e9832d1df
2 changed files with 14 additions and 19 deletions

View file

@ -944,42 +944,37 @@ QPointF QGraphicsItemPrivate::genericMapFromScene(const QPointF &pos,
/*! /*!
\internal \internal
Combines this item's position and transform onto \a transform. Combines this item's position and transform onto \a x.
If you need to change this function (e.g., adding more transformation If you need to change this function (e.g., adding more transformation
modes / options), make sure to change all places marked with COMBINE. modes / options), make sure to change all places marked with COMBINE.
*/ */
void QGraphicsItemPrivate::combineTransformToParent(QTransform *x, const QTransform *viewTransform) const void QGraphicsItemPrivate::combineTransformToParent(QTransform *x) const
{ {
// COMBINE // COMBINE
if (viewTransform && itemIsUntransformable()) { if (transformData) {
*x = q_ptr->deviceTransform(*viewTransform); *x *= transformData->computedFullTransform();
} else { }
if (transformData) if (!pos.isNull()) {
*x *= transformData->computedFullTransform(); *x *= QTransform::fromTranslate(pos.x(), pos.y());
if (!pos.isNull())
*x *= QTransform::fromTranslate(pos.x(), pos.y());
} }
} }
/*! /*!
\internal \internal
Combines this item's position and transform onto \a transform. Combines this item's position and transform onto \a x.
If you need to change this function (e.g., adding more transformation If you need to change this function (e.g., adding more transformation
modes / options), make sure to change QGraphicsItem::deviceTransform() as modes / options), make sure to change QGraphicsItem::deviceTransform() as
well. well.
*/ */
void QGraphicsItemPrivate::combineTransformFromParent(QTransform *x, const QTransform *viewTransform) const void QGraphicsItemPrivate::combineTransformFromParent(QTransform *x) const
{ {
// COMBINE // COMBINE
if (viewTransform && itemIsUntransformable()) { x->translate(pos.x(), pos.y());
*x = q_ptr->deviceTransform(*viewTransform); if (transformData) {
} else { *x = transformData->computedFullTransform(x);
x->translate(pos.x(), pos.y());
if (transformData)
*x = transformData->computedFullTransform(x);
} }
} }

View file

@ -172,8 +172,8 @@ public:
|| (ancestorFlags & AncestorIgnoresTransformations); || (ancestorFlags & AncestorIgnoresTransformations);
} }
void combineTransformToParent(QTransform *x, const QTransform *viewTransform = 0) const; void combineTransformToParent(QTransform *x) const;
void combineTransformFromParent(QTransform *x, const QTransform *viewTransform = 0) const; void combineTransformFromParent(QTransform *x) const;
void updateSceneTransformFromParent(); void updateSceneTransformFromParent();
static bool movableAncestorIsSelected(const QGraphicsItem *item); static bool movableAncestorIsSelected(const QGraphicsItem *item);