summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativeengine.cpp
diff options
context:
space:
mode:
authormae <qt-info@nokia.com>2010-03-17 16:13:00 (GMT)
committermae <qt-info@nokia.com>2010-03-17 16:14:52 (GMT)
commit47fb07c9fdf47584ae55f3412102bbeef5576b04 (patch)
tree772bde723eb4abbc8a7699ac9f2a15953d390267 /src/declarative/qml/qdeclarativeengine.cpp
parentb3cddbcf92a20585fd6fcd0a6c200c5e94b8669f (diff)
downloadQt-47fb07c9fdf47584ae55f3412102bbeef5576b04.zip
Qt-47fb07c9fdf47584ae55f3412102bbeef5576b04.tar.gz
Qt-47fb07c9fdf47584ae55f3412102bbeef5576b04.tar.bz2
Improve implicit "." import
The change moves the implicit "." import to the very end, i.e. the first lookup. It also gets the content of a remote qmldir from the resources.
Diffstat (limited to 'src/declarative/qml/qdeclarativeengine.cpp')
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index 4449404..ce4a9f1 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -1587,6 +1587,8 @@ public:
}
url = base.resolved(QUrl(url)).toString();
+ if (url.endsWith(QLatin1Char('/')))
+ url.chop(1);
}
s->uris.prepend(uri);
@@ -1623,6 +1625,11 @@ public:
}
}
+
+
+ /* now comes really nasty code. It makes "private" types load in the remote case, but
+ it does this by breaking the import order. This must go. Instead private types must
+ be marked private in the qmldir. */
if (url_return) {
*url_return = base.resolved(QUrl(QString::fromUtf8(type + ".qml")));
return true;