aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/particles/qsgparticleemitter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/particles/qsgparticleemitter.cpp')
-rw-r--r--src/declarative/particles/qsgparticleemitter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/declarative/particles/qsgparticleemitter.cpp b/src/declarative/particles/qsgparticleemitter.cpp
index c04c86cfe5..20f3c6bb4b 100644
--- a/src/declarative/particles/qsgparticleemitter.cpp
+++ b/src/declarative/particles/qsgparticleemitter.cpp
@@ -76,6 +76,8 @@ QSGParticleEmitter::~QSGParticleEmitter()
void QSGParticleEmitter::componentComplete()
{
+ if(!m_system && qobject_cast<QSGParticleSystem*>(parentItem()))
+ setSystem(qobject_cast<QSGParticleSystem*>(parentItem()));
if(!m_system)
qWarning() << "Emitter created without a particle system specified";//TODO: useful QML warnings, like line number?
QSGItem::componentComplete();