diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2012-01-16 13:01:19 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-16 11:24:28 +0100 |
commit | 5290b04325aa66f3f2934c9f143eee71d98a3249 (patch) | |
tree | 192b45d6fce25d1fb9478252fb7e20f2d7a3667a /src | |
parent | 5f730bc3ae4cf18c46e513bf1db055b2d9255fdc (diff) |
Test more of QQuickImageParticle
Now the color variance properties are tested, as is the debug code.
Just running the debugging code is valid testing, as it contains
pointer derefernces that could cause runtime errors, and this codepath
is not always enabled at runtime.
Additionally, debug mode control has been consolidated in the
ParticleSystem. However, this was not necessary for this test addition.
Change-Id: Ie56465145461486456462154dfafe546fedabcba
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/quick/particles/qquickimageparticle.cpp | 5 | ||||
-rw-r--r-- | src/quick/particles/qquickparticlesystem_p.h | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/quick/particles/qquickimageparticle.cpp b/src/quick/particles/qquickimageparticle.cpp index 5ca7d80925..beeebdc233 100644 --- a/src/quick/particles/qquickimageparticle.cpp +++ b/src/quick/particles/qquickimageparticle.cpp @@ -55,8 +55,6 @@ #include <private/qdeclarativeglobal_p.h> QT_BEGIN_NAMESPACE -//###Switch to define later, for now user-friendly (no compilation) debugging is worth it -DEFINE_BOOL_CONFIG_OPTION(qmlParticlesDebug, QML_PARTICLES_DEBUG) #ifndef QT_OPENGL_ES_2 #define SHADER_DEFINES "#version 120\n" @@ -825,7 +823,6 @@ QQuickImageParticle::QQuickImageParticle(QQuickItem* parent) , m_entryEffect(Fade) { setFlag(ItemHasContents); - m_debugMode = qmlParticlesDebug(); } QQuickImageParticle::~QQuickImageParticle() @@ -1222,6 +1219,8 @@ QSGGeometryNode* QQuickImageParticle::buildParticleNodes() if (count() <= 0) return 0; + m_debugMode = m_system->m_debugMode; + if (m_sprites.count() || m_bypassOptimizations) { perfLevel = Sprites; } else if (!m_colortable_name.isEmpty() || !m_sizetable_name.isEmpty() diff --git a/src/quick/particles/qquickparticlesystem_p.h b/src/quick/particles/qquickparticlesystem_p.h index 7a16b77df3..43bcafe347 100644 --- a/src/quick/particles/qquickparticlesystem_p.h +++ b/src/quick/particles/qquickparticlesystem_p.h @@ -302,6 +302,7 @@ public: void updateCurrentTime( int currentTime ); QQuickParticleSystemAnimation* m_animation; bool m_running; + bool m_debugMode; int timeInt; bool initialized; @@ -340,7 +341,6 @@ private: QSignalMapper m_painterMapper; QSignalMapper m_emitterMapper; bool m_paused; - bool m_debugMode; bool m_allDead; bool m_empty; }; |