summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorLeonardo Sobral Cunha <leo.cunha@nokia.com>2009-11-09 16:44:54 (GMT)
committerLeonardo Sobral Cunha <leo.cunha@nokia.com>2009-11-09 16:46:47 (GMT)
commitecdecf7a628aa1c9eb953984c89fc65ffa767a24 (patch)
tree90573e44b1d3defa27eefef82bc0a132274e866f /src/corelib
parent963d42fbf1fb68c2bd09b12dedbad000d8001b94 (diff)
downloadQt-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
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/animation/qpropertyanimation.cpp10
-rw-r--r--src/corelib/animation/qsequentialanimationgroup.cpp8
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