summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-03-08 05:32:16 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2010-03-08 05:33:58 (GMT)
commit03a2ed58778d500cc7eed285478d0e304b3c92dc (patch)
tree61a22bfcd4dd76d5c4f02a349a214cc95fc73ceb
parentbea42565ae3b909b7e78731b58809cf400cb9694 (diff)
downloadQt-03a2ed58778d500cc7eed285478d0e304b3c92dc.zip
Qt-03a2ed58778d500cc7eed285478d0e304b3c92dc.tar.gz
Qt-03a2ed58778d500cc7eed285478d0e304b3c92dc.tar.bz2
Particles optimization and doc fixes.
-rw-r--r--src/declarative/graphicsitems/qdeclarativeparticles.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeparticles.cpp b/src/declarative/graphicsitems/qdeclarativeparticles.cpp
index deabdd6..ec0bf6c 100644
--- a/src/declarative/graphicsitems/qdeclarativeparticles.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeparticles.cpp
@@ -758,11 +758,13 @@ void QDeclarativeParticles::setSource(const QUrl &name)
The particles element emits particles until it has count active
particles. When this number is reached, new particles are not emitted until
- some of the current particles reach theend of their lifespan.
+ some of the current particles reach the end of their lifespan.
If count is -1 then there is no maximum number of active particles, and
particles will be constantly emitted at the rate specified by emissionRate.
+ The default value for count is 1.
+
If both count and emissionRate are set to -1, nothing will be emitted.
*/
@@ -1219,7 +1221,7 @@ void QDeclarativeParticles::burst(int count, int emissionRate)
void QDeclarativeParticlesPainter::updateSize()
{
- if (!isComponentComplete())
+ if (!d->_componentComplete)
return;
const int parentX = parentItem()->x();
@@ -1304,7 +1306,7 @@ void QDeclarativeParticles::componentComplete()
{
Q_D(QDeclarativeParticles);
QDeclarativeItem::componentComplete();
- if (d->count) {
+ if (d->count && d->emissionRate) {
d->paintItem->updateSize();
d->clock.start();
}