summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/declarative/fx/qfxflickable.cpp4
-rw-r--r--src/declarative/fx/qfxpainteditem.cpp14
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp4
3 files changed, 8 insertions, 14 deletions
diff --git a/src/declarative/fx/qfxflickable.cpp b/src/declarative/fx/qfxflickable.cpp
index 0ea50b8..007fa0e 100644
--- a/src/declarative/fx/qfxflickable.cpp
+++ b/src/declarative/fx/qfxflickable.cpp
@@ -433,8 +433,8 @@ void QFxFlickable::setViewportX(qreal pos)
{
Q_D(QFxFlickable);
pos = qRound(pos);
+ d->timeline.reset(d->_moveX);
if (-pos != d->_moveX.value()) {
- d->timeline.reset(d->_moveX);
d->_moveX.setValue(-pos);
viewportMoved();
}
@@ -450,8 +450,8 @@ void QFxFlickable::setViewportY(qreal pos)
{
Q_D(QFxFlickable);
pos = qRound(pos);
+ d->timeline.reset(d->_moveY);
if (-pos != d->_moveY.value()) {
- d->timeline.reset(d->_moveY);
d->_moveY.setValue(-pos);
viewportMoved();
}
diff --git a/src/declarative/fx/qfxpainteditem.cpp b/src/declarative/fx/qfxpainteditem.cpp
index 695236d..cbd00cf 100644
--- a/src/declarative/fx/qfxpainteditem.cpp
+++ b/src/declarative/fx/qfxpainteditem.cpp
@@ -208,12 +208,6 @@ void QFxPaintedItem::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidge
++inpaint;
- bool oldAntiAliasing = p->testRenderHint(QPainter::Antialiasing);
- bool oldSmoothPixmap = p->testRenderHint(QPainter::SmoothPixmapTransform);
- if (oldAntiAliasing)
- p->setRenderHints(QPainter::Antialiasing, false); // cannot stitch properly otherwise
- if (d->smooth)
- p->setRenderHints(QPainter::SmoothPixmapTransform, true);
QRectF clipf = p->clipRegion().boundingRect();
if (clipf.isEmpty())
clipf = mapToScene(content).boundingRect(); // ### Inefficient: Maps toScene and then fromScene
@@ -234,6 +228,7 @@ void QFxPaintedItem::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidge
if (!d->cachefrozen) {
if (!d->imagecache[i]->dirty.isNull() && topaint.contains(d->imagecache[i]->dirty)) {
QPainter qp(&d->imagecache[i]->image);
+ qp.setRenderHints(QPainter::HighQualityAntialiasing | QPainter::Antialiasing | QPainter::TextAntialiasing | QPainter::SmoothPixmapTransform, d->smooth);
qp.translate(-area.x(), -area.y());
if (d->fillColor.isValid())
qp.fillRect(d->imagecache[i]->dirty,d->fillColor);
@@ -280,6 +275,8 @@ void QFxPaintedItem::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidge
img.fill(d->fillColor);
{
QPainter qp(&img);
+ qp.setRenderHints(QPainter::HighQualityAntialiasing | QPainter::Antialiasing | QPainter::TextAntialiasing | QPainter::SmoothPixmapTransform, d->smooth);
+
qp.translate(-r.x(),-r.y());
drawContents(&qp, r);
}
@@ -296,11 +293,6 @@ void QFxPaintedItem::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidge
}
}
- if (oldAntiAliasing)
- p->setRenderHints(QPainter::Antialiasing, oldAntiAliasing);
- if (d->smooth)
- p->setRenderHints(QPainter::SmoothPixmapTransform, oldSmoothPixmap);
-
if (inpaint_clearcache) {
clearCache();
inpaint_clearcache = 0;
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 4cb4dcf..1d55534 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -4789,10 +4789,12 @@ void QGraphicsItemPrivate::updateCachedClipPathFromSetPosHelper(const QPointF &n
if (transformData)
thisToParentTransform = transformData->computedFullTransform(&thisToParentTransform);
QGraphicsItem *clipParent = parent;
- while (clipParent && !(clipParent->d_ptr->flags & QGraphicsItem::ItemClipsChildrenToShape)) {
+ while (clipParent && !clipParent->d_ptr->inDestructor && !(clipParent->d_ptr->flags & QGraphicsItem::ItemClipsChildrenToShape)) {
thisToParentTransform *= clipParent->d_ptr->transformToParent();
clipParent = clipParent->d_ptr->parent;
}
+ if (clipParent && clipParent->d_ptr->inDestructor)
+ return;
// thisToParentTransform is now the same as q->itemTransform(clipParent), except
// that the new position (which is not yet set on the item) is taken into account.