Add some more particles debugging information
authorAlan Alpert <alan.alpert@nokia.com>
Tue, 13 Dec 2011 05:44:21 +0000 (15:44 +1000)
committerQt by Nokia <qt-info@nokia.com>
Fri, 16 Dec 2011 02:42:39 +0000 (03:42 +0100)
Output registrations to help make system ownership clear. Only if debug
output flag set.

Change-Id: I75370eff1140e54aa5c23cc820342c89ef3af282
Reviewed-by: Martin Jones <martin.jones@nokia.com>
src/quick/particles/qquickparticlesystem.cpp

index e76be77..676f191 100644 (file)
@@ -675,6 +675,8 @@ void QQuickParticleSystem::initGroups()
 
 void QQuickParticleSystem::registerParticlePainter(QQuickParticlePainter* p)
 {
+    if (m_debugMode)
+        qDebug() << "Registering Painter" << p << "to" << this;
     //TODO: a way to Unregister emitters, painters and affectors
     m_painters << QPointer<QQuickParticlePainter>(p);//###Set or uniqueness checking?
     connect(p, SIGNAL(groupsChanged(QStringList)),
@@ -684,6 +686,8 @@ void QQuickParticleSystem::registerParticlePainter(QQuickParticlePainter* p)
 
 void QQuickParticleSystem::registerParticleEmitter(QQuickParticleEmitter* e)
 {
+    if (m_debugMode)
+        qDebug() << "Registering Emitter" << e << "to" << this;
     m_emitters << QPointer<QQuickParticleEmitter>(e);//###How to get them out?
     connect(e, SIGNAL(particleCountChanged()),
             this, SLOT(emittersChanged()));
@@ -695,11 +699,15 @@ void QQuickParticleSystem::registerParticleEmitter(QQuickParticleEmitter* e)
 
 void QQuickParticleSystem::registerParticleAffector(QQuickParticleAffector* a)
 {
+    if (m_debugMode)
+        qDebug() << "Registering Affector" << a << "to" << this;
     m_affectors << QPointer<QQuickParticleAffector>(a);
 }
 
 void QQuickParticleSystem::registerParticleGroup(QQuickParticleGroup* g)
 {
+    if (m_debugMode)
+        qDebug() << "Registering Group" << g << "to" << this;
     m_groups << QPointer<QQuickParticleGroup>(g);
     createEngine();
 }