summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/declarative/fx/qfxitem.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp
index 0c4d97b..73786a8 100644
--- a/src/declarative/fx/qfxitem.cpp
+++ b/src/declarative/fx/qfxitem.cpp
@@ -897,7 +897,16 @@ void QFxItem::qmlLoaded()
QmlContext *ctxt = new QmlContext(qmlContext(this));
ctxt->addDefaultObject(this);
+ if (!d->_qmlcomp->errors().isEmpty()) {
+ qWarning() << d->_qmlcomp->errors();
+ delete d->_qmlcomp;
+ d->_qmlcomp = 0;
+ emit qmlChanged();
+ return;
+ }
QObject *obj = d->_qmlcomp->create(ctxt);
+ if (!d->_qmlcomp->errors().isEmpty())
+ qWarning() << d->_qmlcomp->errors();
QFxItem *qmlChild = qobject_cast<QFxItem *>(obj);
if (qmlChild) {
qmlChild->setItemParent(this);