diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2011-06-09 15:17:52 +1000 |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2011-06-09 15:17:52 +1000 |
commit | 283a37447b8c400957c4da7dda35a84ea86ac4ad (patch) | |
tree | efd00da37181fb65b4a7dc89b55d3730e76a781b /src/declarative/particles/qsgparticlepainter.cpp | |
parent | e726fa507dd93224bbb8c36ff53f90f61be76061 (diff) |
Automatically set system if parent is a ParticleSystem
Diffstat (limited to 'src/declarative/particles/qsgparticlepainter.cpp')
-rw-r--r-- | src/declarative/particles/qsgparticlepainter.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/declarative/particles/qsgparticlepainter.cpp b/src/declarative/particles/qsgparticlepainter.cpp index 8814c61b56..a5e8c0a3e6 100644 --- a/src/declarative/particles/qsgparticlepainter.cpp +++ b/src/declarative/particles/qsgparticlepainter.cpp @@ -54,8 +54,10 @@ QSGParticlePainter::QSGParticlePainter(QSGItem *parent) : void QSGParticlePainter::componentComplete() { + if(!m_system && qobject_cast<QSGParticleSystem*>(parentItem())) + setSystem(qobject_cast<QSGParticleSystem*>(parentItem())); if(!m_system) - qWarning() << "Particle created without a particle system specified";//TODO: useful QML warnings, like line number? + qWarning() << "ParticlePainter created without a particle system specified";//TODO: useful QML warnings, like line number? QSGItem::componentComplete(); } |