This fixes an error where running couldn't be reliably set, if a frame
property was also being set during initialization. With this fixed, the
autotest is no longer unstable.
Also fixed is a related issue where start/stop/restart were active
before componentComplete.
Change-Id: I34c6d872f2f146d38c65167eda8c0a97525d7f4e
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
void QQuickAnimatedSprite::start()
{
- if (m_running)
+ m_running = true;
+ if (!isComponentComplete())
return;
m_curLoop = 0;
m_timestamp.start();
m_spriteEngine->updateSprites(0);
m_spriteEngine->start(0);
}
- m_running = true;
+ emit currentFrameChanged(0);
emit runningChanged(true);
update();
}
void QQuickAnimatedSprite::stop()
{
- if (!m_running)
- return;
m_running = false;
+ if (!isComponentComplete())
+ return;
m_pauseOffset = 0;
emit runningChanged(false);
}
if (m_sprite->m_frameSync != arg) {
m_sprite->setFrameSync(arg);
emit frameSyncChanged(arg);
- restart();
+ if (m_running)
+ restart();
}
}
if (m_sprite->m_frameRate != arg) {
m_sprite->setFrameRate(arg);
emit frameRateChanged(arg);
- restart();
+ if (m_running)
+ restart();
}
}
if (m_sprite->m_frameDuration != arg) {
m_sprite->setFrameDuration(arg);
emit frameDurationChanged(arg);
- restart();
+ if (m_running)
+ restart();
}
}
CONFIG += parallel_test
QT += core-private gui-private qml-private quick-private network testlib
-CONFIG += insignificant_test