summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlcomponent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/qml/qmlcomponent.cpp')
-rw-r--r--src/declarative/qml/qmlcomponent.cpp24
1 files changed, 8 insertions, 16 deletions
diff --git a/src/declarative/qml/qmlcomponent.cpp b/src/declarative/qml/qmlcomponent.cpp
index c316f03..3b4d7b3 100644
--- a/src/declarative/qml/qmlcomponent.cpp
+++ b/src/declarative/qml/qmlcomponent.cpp
@@ -137,9 +137,7 @@ void QmlComponentPrivate::fromTypeData(QmlCompositeTypeData *data)
if (!c) {
Q_ASSERT(data->status == QmlCompositeTypeData::Error);
- errorDescription = data->errorDescription;
- qWarning().nospace() << "QmlComponent: "
- << data->errorDescription.toLatin1().constData();
+ errors = data->errors;
} else {
@@ -194,7 +192,7 @@ QmlComponent::Status QmlComponent::status() const
return Loading;
else if (d->engine && d->cc)
return Ready;
- else if (!d->errorDescription.isEmpty())
+ else if (!d->errors.isEmpty())
return Error;
else
return Null;
@@ -353,13 +351,13 @@ void QmlComponent::loadUrl(const QUrl &url)
emit statusChanged(status());
}
-QString QmlComponent::errorDescription() const
+QList<QmlError> QmlComponent::errors() const
{
Q_D(const QmlComponent);
if (isError())
- return d->errorDescription;
+ return d->errors;
else
- return QString();
+ return QList<QmlError>();
}
/*!
@@ -448,7 +446,7 @@ QObject *QmlComponent::beginCreate(QmlContext *context)
}
if (!isReady()) {
- qWarning("QmlComponent: Cannot create un-ready component");
+ qWarning("QmlComponent: Component is not ready");
return 0;
}
@@ -466,15 +464,9 @@ QObject *QmlComponent::beginCreate(QmlContext *context)
QmlVME vme;
QObject *rv = vme.run(ctxt, d->cc, d->start, d->count);
- if (vme.isError()) {
- qWarning().nospace()
-#ifdef QML_VERBOSEERRORS_ENABLED
- << "QmlComponent: "
-#endif
- << vme.errorDescription().toLatin1().constData() << " @"
- << d->url.toString().toLatin1().constData() << ":" << vme.errorLine();
- }
+ if (vme.isError())
+ d->errors = vme.errors();
ctxt->deactivate();