diff options
author | Morten Johan Sørvig <morten.sorvig@nokia.com> | 2010-03-25 07:42:21 (GMT) |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@nokia.com> | 2010-03-25 07:42:21 (GMT) |
commit | 20779098f4eb73f8789d704e1a2818ddbbf5b4d2 (patch) | |
tree | b1c4e3edb447ee47f9bc724f106d1bbefcff5456 /src/declarative/graphicsitems/qdeclarativeflipable.cpp | |
parent | 8cc346604ed1e1504964772613ed9fe531361f69 (diff) | |
parent | 194013d9db1b3e4ba6f56a864f3b64f523202948 (diff) | |
download | Qt-20779098f4eb73f8789d704e1a2818ddbbf5b4d2.zip Qt-20779098f4eb73f8789d704e1a2818ddbbf5b4d2.tar.gz Qt-20779098f4eb73f8789d704e1a2818ddbbf5b4d2.tar.bz2 |
Merge remote branch 'main/4.7' into 4.7
Conflicts:
demos/declarative/minehunt/minehunt.cpp
src/declarative/qml/qdeclarativecompiler.cpp
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativeflipable.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativeflipable.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeflipable.cpp b/src/declarative/graphicsitems/qdeclarativeflipable.cpp index d19e5a5..1fa08bb 100644 --- a/src/declarative/graphicsitems/qdeclarativeflipable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflipable.cpp @@ -42,6 +42,7 @@ #include "qdeclarativeflipable_p.h" #include "qdeclarativeitem_p.h" +#include "qdeclarativeguard_p.h" #include <qdeclarativeinfo.h> @@ -58,8 +59,8 @@ public: void updateSceneTransformFromParent(); QDeclarativeFlipable::Side current; - QDeclarativeItem *front; - QDeclarativeItem *back; + QDeclarativeGuard<QDeclarativeItem> front; + QDeclarativeGuard<QDeclarativeItem> back; }; /*! @@ -159,7 +160,7 @@ QDeclarativeFlipable::Side QDeclarativeFlipable::side() const { Q_D(const QDeclarativeFlipable); if (d->dirtySceneTransform) - const_cast<QDeclarativeFlipablePrivate *>(d)->updateSceneTransformFromParent(); + const_cast<QDeclarativeFlipablePrivate *>(d)->ensureSceneTransform(); return d->current; } @@ -192,7 +193,7 @@ void QDeclarativeFlipablePrivate::updateSceneTransformFromParent() if (newSide != current) { current = newSide; - if (current == QDeclarativeFlipable::Back) { + if (current == QDeclarativeFlipable::Back && back) { QTransform mat; mat.translate(back->width()/2,back->height()/2); if (back->width() && p1.x() >= p2.x()) |