diff options
Diffstat (limited to 'src/declarative/qml/qdeclarativecomponent.cpp')
-rw-r--r-- | src/declarative/qml/qdeclarativecomponent.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp index fe63ad2..d6bb216 100644 --- a/src/declarative/qml/qdeclarativecomponent.cpp +++ b/src/declarative/qml/qdeclarativecomponent.cpp @@ -437,6 +437,13 @@ void QDeclarativeComponent::loadUrl(const QUrl &url) else d->url = url; + if (url.isEmpty()) { + QDeclarativeError error; + error.setDescription(tr("Invalid empty URL")); + d->state.errors << error; + return; + } + QDeclarativeCompositeTypeData *data = QDeclarativeEnginePrivate::get(d->engine)->typeManager.get(d->url); @@ -618,7 +625,7 @@ QDeclarativeComponentPrivate::beginCreate(QDeclarativeContext *context, const QB QObject *rv = begin(ctxt, ep, cc, start, count, &state, bindings); if (rv) { - QDeclarativeGraphics_setParent_noEvent(ctxt, rv); + QDeclarative_setParent_noEvent(ctxt, rv); } else { delete ctxt; } |