Connection was accidentally of the Queued variety
authorAlan Alpert <alan.alpert@nokia.com>
Thu, 12 Jan 2012 10:32:56 +0000 (20:32 +1000)
committerQt by Nokia <qt-info@nokia.com>
Tue, 17 Jan 2012 06:55:00 +0000 (07:55 +0100)
This connection needs to be direct, because right after that signal is
emitted the next frame is drawn (before we return to the event loop at
least). The sprite updating needs to happen in time for the frame or the
sprites get confused.

Task-number: QTBUG-23407
Change-Id: Ie56465145461486456462154dfafe546fedaaaaa
Reviewed-by: Martin Jones <martin.jones@nokia.com>
src/quick/particles/qquickimageparticle.cpp

index beeebdc..0e0f4a2 100644 (file)
@@ -1112,7 +1112,7 @@ void QQuickImageParticle::createEngine()
     if (m_sprites.count()) {
         m_spriteEngine = new QQuickSpriteEngine(m_sprites, this);
         connect(m_spriteEngine, SIGNAL(stateChanged(int)),
-                this, SLOT(spriteAdvance(int)));
+                this, SLOT(spriteAdvance(int)), Qt::DirectConnection);
         m_explicitAnimation = true;
     } else {
         m_spriteEngine = 0;