diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-10-28 06:06:29 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-10-28 06:06:29 (GMT) |
commit | b7a30841120afb7be26fe980489db5757f1d2ef3 (patch) | |
tree | 018e1043fb06f2034553e1c70a9a820ab26efa20 /src/declarative/qml/qmlcomponent.cpp | |
parent | 753f8a4f263fd44ec22c7f6b0835df1466d01f82 (diff) | |
parent | d14b406afb2286583c4efdd32522a82f9c130d52 (diff) | |
download | Qt-b7a30841120afb7be26fe980489db5757f1d2ef3.zip Qt-b7a30841120afb7be26fe980489db5757f1d2ef3.tar.gz Qt-b7a30841120afb7be26fe980489db5757f1d2ef3.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative/qml/qmlcomponent.cpp')
-rw-r--r-- | src/declarative/qml/qmlcomponent.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/declarative/qml/qmlcomponent.cpp b/src/declarative/qml/qmlcomponent.cpp index 1e3a082..bd2d1d0 100644 --- a/src/declarative/qml/qmlcomponent.cpp +++ b/src/declarative/qml/qmlcomponent.cpp @@ -55,6 +55,7 @@ #include "qmlbinding.h" #include <QtCore/qdebug.h> #include <QApplication> +#include <private/qmlbinding_p.h> #include "qmlscriptparser_p.h" @@ -197,6 +198,12 @@ QmlComponent::QmlComponent(QObject *parent) QmlComponent::~QmlComponent() { Q_D(QmlComponent); + + if (d->completePending) { + qWarning("QmlComponent: Component destroyed while completion pending"); + d->completeCreate(); + } + if (d->typeData) { d->typeData->remWaiter(d); d->typeData->release(); @@ -585,8 +592,10 @@ QmlComponentPrivate::beginCreate(QmlContext *context, const QBitField &bindings) ep->bindValues.clear(); ep->parserStatus.clear(); completePending = true; + QmlEnginePrivate::get(engine)->inProgressCreations++; } + if (rv) { QFx_setParent_noEvent(ctxt, rv); } else { @@ -654,6 +663,14 @@ void QmlComponentPrivate::completeCreate() bindValues.clear(); parserStatus.clear(); completePending = false; + QmlEnginePrivate *p = QmlEnginePrivate::get(engine); + p->inProgressCreations--; + if (0 == p->inProgressCreations) { + while (p->erroredBindings) { + qWarning().nospace() << qPrintable(p->erroredBindings->error.toString()); + p->erroredBindings->removeError(); + } + } } } |