diff options
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(); } |