From b8868d6622b4381c60cabf458a9b80b1bfb92d61 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Fri, 7 Aug 2009 09:05:29 +1000 Subject: Optimization: Use setparent_noevent where appropriate. --- src/declarative/extra/qmlbehaviour.cpp | 3 ++- src/declarative/util/qmlanimation.cpp | 12 ++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/declarative/extra/qmlbehaviour.cpp b/src/declarative/extra/qmlbehaviour.cpp index 0e70bdc..052225a 100644 --- a/src/declarative/extra/qmlbehaviour.cpp +++ b/src/declarative/extra/qmlbehaviour.cpp @@ -125,7 +125,8 @@ QmlBehaviour::QmlBehaviour(QObject *parent) : QmlPropertyValueSource(*(new QmlBehaviourPrivate), parent) { Q_D(QmlBehaviour); - d->group = new QParallelAnimationGroup(this); + d->group = new QParallelAnimationGroup; + QFx_setParent_noEvent(d->group, this); } /*! diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp index f3691ea..224f668 100644 --- a/src/declarative/util/qmlanimation.cpp +++ b/src/declarative/util/qmlanimation.cpp @@ -654,7 +654,8 @@ QmlPauseAnimation::~QmlPauseAnimation() void QmlPauseAnimationPrivate::init() { Q_Q(QmlPauseAnimation); - pa = new QPauseAnimation(q); + pa = new QPauseAnimation; + QFx_setParent_noEvent(pa, q); } /*! @@ -799,7 +800,8 @@ QmlRunScriptAction::~QmlRunScriptAction() void QmlRunScriptActionPrivate::init() { Q_Q(QmlRunScriptAction); - rsa = new QActionAnimation(&proxy, q); + rsa = new QActionAnimation(&proxy); + QFx_setParent_noEvent(rsa, q); } /*! @@ -906,7 +908,8 @@ QmlSetPropertyAction::~QmlSetPropertyAction() void QmlSetPropertyActionPrivate::init() { Q_Q(QmlSetPropertyAction); - spa = new QActionAnimation(q); + spa = new QActionAnimation; + QFx_setParent_noEvent(spa, q); } /*! @@ -1096,7 +1099,8 @@ QmlParentChangeAction::~QmlParentChangeAction() void QmlParentChangeActionPrivate::init() { Q_Q(QmlParentChangeAction); - cpa = new QActionAnimation(q); + cpa = new QActionAnimation; + QFx_setParent_noEvent(cpa, q); } void QmlParentChangeActionPrivate::doAction() -- cgit v0.12