From 1517c4fb9199d32c69378808a27f83d2edf065b2 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Thu, 29 Apr 2010 16:05:51 +1000 Subject: Ensure filenames are correctly resolved Works around QUrl("file:a").isRelative() being false. Reviewed-by: Aaron Kennedy --- src/declarative/qml/qdeclarativecomponent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp index b83e9f4..a80f183 100644 --- a/src/declarative/qml/qdeclarativecomponent.cpp +++ b/src/declarative/qml/qdeclarativecomponent.cpp @@ -421,7 +421,7 @@ QDeclarativeComponent::QDeclarativeComponent(QDeclarativeEngine *engine, const Q { Q_D(QDeclarativeComponent); d->engine = engine; - loadUrl(QUrl::fromLocalFile(fileName)); + loadUrl(d->engine->baseUrl().resolved(QUrl::fromLocalFile(fileName))); } /*! -- cgit v0.12