summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-09-22 00:07:01 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-09-22 00:07:01 (GMT)
commitd125e01313b269d70577975f6e78d28a9105ada1 (patch)
treea1283e847f6d419f8c28ba3112b61c6184473c3d /src/declarative/qml
parentc38c6f984f3b08db106dcd249c3339d42cc82aa3 (diff)
downloadQt-d125e01313b269d70577975f6e78d28a9105ada1.zip
Qt-d125e01313b269d70577975f6e78d28a9105ada1.tar.gz
Qt-d125e01313b269d70577975f6e78d28a9105ada1.tar.bz2
Ensure absolute path for qmldir URL.
Diffstat (limited to 'src/declarative/qml')
-rw-r--r--src/declarative/qml/qmlengine.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp
index c6edbe2..dd6b5a4 100644
--- a/src/declarative/qml/qmlengine.cpp
+++ b/src/declarative/qml/qmlengine.cpp
@@ -1519,8 +1519,9 @@ public:
bool found = false;
foreach (QString p, importPath) {
QString dir = p+QLatin1Char('/')+url;
- if (QFile::exists(dir+QLatin1String("/qmldir"))) {
- url = QLatin1String("file://")+dir;
+ QFileInfo fi(dir+QLatin1String("/qmldir"));
+ if (fi.isFile()) {
+ url = QUrl::fromLocalFile(fi.absolutePath()).toString();
found = true;
break;
}