diff options
author | Leonardo Sobral Cunha <leo.cunha@nokia.com> | 2009-11-09 16:44:54 (GMT) |
---|---|---|
committer | Leonardo Sobral Cunha <leo.cunha@nokia.com> | 2009-11-09 16:46:47 (GMT) |
commit | ecdecf7a628aa1c9eb953984c89fc65ffa767a24 (patch) | |
tree | 90573e44b1d3defa27eefef82bc0a132274e866f | |
parent | 963d42fbf1fb68c2bd09b12dedbad000d8001b94 (diff) | |
download | Qt-ecdecf7a628aa1c9eb953984c89fc65ffa767a24.zip Qt-ecdecf7a628aa1c9eb953984c89fc65ffa767a24.tar.gz Qt-ecdecf7a628aa1c9eb953984c89fc65ffa767a24.tar.bz2 |
Fix docs for animation api
All animation api code snippets should use references instead of
local variables.
Task-number: QTBUG-5616
Reviewed-by: thierry
-rw-r--r-- | src/corelib/animation/qpropertyanimation.cpp | 10 | ||||
-rw-r--r-- | src/corelib/animation/qsequentialanimationgroup.cpp | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/corelib/animation/qpropertyanimation.cpp b/src/corelib/animation/qpropertyanimation.cpp index 3065083..013ff7f 100644 --- a/src/corelib/animation/qpropertyanimation.cpp +++ b/src/corelib/animation/qpropertyanimation.cpp @@ -58,12 +58,12 @@ an example: \code - QPropertyAnimation animation(myWidget, "geometry"); - animation.setDuration(10000); - animation.setStartValue(QRect(0, 0, 100, 30)); - animation.setEndValue(QRect(250, 250, 100, 30)); + QPropertyAnimation *animation = new QPropertyAnimation(myWidget, "geometry"); + animation->setDuration(10000); + animation->setStartValue(QRect(0, 0, 100, 30)); + animation->setEndValue(QRect(250, 250, 100, 30)); - animation.start(); + animation->start(); \endcode The property name and the QObject instance of which property diff --git a/src/corelib/animation/qsequentialanimationgroup.cpp b/src/corelib/animation/qsequentialanimationgroup.cpp index 861e26e..5dbb8c3 100644 --- a/src/corelib/animation/qsequentialanimationgroup.cpp +++ b/src/corelib/animation/qsequentialanimationgroup.cpp @@ -63,12 +63,12 @@ pause to a sequential animation group. \code - QSequentialAnimationGroup group; + QSequentialAnimationGroup *group = new QSequentialAnimationGroup; - group.addAnimation(anim1); - group.addAnimation(anim2); + group->addAnimation(anim1); + group->addAnimation(anim2); - group.start(); + group->start(); \endcode In this example, \c anim1 and \c anim2 are two already set up |