diff options
author | mae <qt-info@nokia.com> | 2010-03-17 16:13:00 (GMT) |
---|---|---|
committer | mae <qt-info@nokia.com> | 2010-03-17 16:14:52 (GMT) |
commit | 47fb07c9fdf47584ae55f3412102bbeef5576b04 (patch) | |
tree | 772bde723eb4abbc8a7699ac9f2a15953d390267 /src/declarative/qml/qdeclarativeengine.cpp | |
parent | b3cddbcf92a20585fd6fcd0a6c200c5e94b8669f (diff) | |
download | Qt-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.cpp | 7 |
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; |