diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-11-23 01:12:19 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-11-23 01:12:19 (GMT) |
commit | 60e39093e9bd76b88027863d60873bc82492be50 (patch) | |
tree | 1f05a97da1722eb5f83700f3fd897b8a1290ffd8 /src/declarative | |
parent | b316de95032216a90a8262cce3708f781f8ccbd9 (diff) | |
parent | 831d30af205d5125f762696bb6f9a5f9d1e3c5f5 (diff) | |
download | Qt-60e39093e9bd76b88027863d60873bc82492be50.zip Qt-60e39093e9bd76b88027863d60873bc82492be50.tar.gz Qt-60e39093e9bd76b88027863d60873bc82492be50.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/graphicsitems/qmlgraphicsitem.cpp | 2 | ||||
-rw-r--r-- | src/declarative/util/qmlstate_p_p.h | 25 |
2 files changed, 25 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicsitem.cpp b/src/declarative/graphicsitems/qmlgraphicsitem.cpp index fb6afb1..263aea5 100644 --- a/src/declarative/graphicsitems/qmlgraphicsitem.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsitem.cpp @@ -2307,7 +2307,7 @@ void QmlGraphicsItem::setBaselineOffset(qreal offset) Opacity is an \e inherited attribute. That is, the opacity is also applied individually to child items. In almost all cases this is what you want. If you can spot the issue in the following - example, you might need to use an opacity filter (not yet available) instead. + example, you might need to use an \l Opacity effect instead. \table \row diff --git a/src/declarative/util/qmlstate_p_p.h b/src/declarative/util/qmlstate_p_p.h index 095a7d2..75eb3fd 100644 --- a/src/declarative/util/qmlstate_p_p.h +++ b/src/declarative/util/qmlstate_p_p.h @@ -102,7 +102,30 @@ public: QString name; QmlBinding *when; - QmlConcreteList<QmlStateOperation *> operations; + + class OperationList; + struct OperationGuard : public QGuard<QmlStateOperation> + { + OperationGuard(QObject *obj, OperationList *l) : list(l) { (QGuard<QObject>&)*this = obj; } + OperationList *list; + void objectDestroyed(QmlStateOperation *) { + // we assume priv will always be destroyed after objectDestroyed calls + list->removeOne(*this); + } + }; + + typedef QList<OperationGuard> GuardedOpList; + class OperationList : public GuardedOpList, public QmlList<QmlStateOperation*> + { + public: + virtual void append(QmlStateOperation* v) { GuardedOpList::append(OperationGuard(v, this)); } + virtual void insert(int i, QmlStateOperation* v) { GuardedOpList::insert(i, OperationGuard(v, this)); } + virtual void clear() { GuardedOpList::clear(); } + virtual QmlStateOperation* at(int i) const { return GuardedOpList::at(i); } + virtual void removeAt(int i) { GuardedOpList::removeAt(i); } + virtual int count() const { return GuardedOpList::count(); } + }; + OperationList operations; QmlTransitionManager transitionManager; |