From ca8231566ac3804e479502d082871ab8ca28b8bb Mon Sep 17 00:00:00 2001 From: mae Date: Wed, 17 Mar 2010 14:21:21 +0100 Subject: Fix auto test This repairs 9727cb35b30e07d1f72100a39c8d23e438e2746c. The lookup can only happen if we have a file import (and not a library import) --- src/declarative/qml/qdeclarativeengine.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index f655151..4449404 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -1386,7 +1386,6 @@ struct QDeclarativeEnginePrivate::ImportedNamespace { QString qmldircontent = qmlDirContent.at(i); if (!qmldircontent.isEmpty()) { - const QString typeName = QString::fromUtf8(type); QDeclarativeDirParser qmldirParser; @@ -1403,15 +1402,16 @@ struct QDeclarativeEnginePrivate::ImportedNamespace { } } } - } - // XXX search non-files too! (eg. zip files, see QT-524) - QFileInfo f(toLocalFileOrQrc(url)); - if (f.exists()) { - if (url_return) - *url_return = url; - return true; + if (!isLibrary.at(i)) { + // XXX search non-files too! (eg. zip files, see QT-524) + QFileInfo f(toLocalFileOrQrc(url)); + if (f.exists()) { + if (url_return) + *url_return = url; + return true; + } } } return false; -- cgit v0.12