From 7ec1d316f4eefc12b7fe040e467f799a67ce0a11 Mon Sep 17 00:00:00 2001 From: Arnaud Vrac Date: Thu, 28 Jul 2016 20:27:56 +0200 Subject: Fix import with qualifier of remote directory with qmldir Do not skip qmldir loading when using an import qualifier and the resolved uri is remote. This makes the import behavior the same in all cases. Task-number: QTBUG-55002 Change-Id: I99d68be02ddd062e387d36946e730df076e80a8d Reviewed-by: Simon Hausmann --- tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/auto/qml/qqmllanguage') diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp index f32051a26a..8a60b04494 100644 --- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp +++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp @@ -2601,7 +2601,7 @@ void tst_qqmllanguage::basicRemote_data() QTest::newRow("no need for qmldir") << QUrl(serverdir+"Test.qml") << "" << ""; QTest::newRow("absent qmldir") << QUrl(serverdir+"/noqmldir/Test.qml") << "" << ""; - QTest::newRow("need qmldir") << QUrl(serverdir+"TestLocal.qml") << "" << ""; + QTest::newRow("need qmldir") << QUrl(serverdir+"TestNamed.qml") << "" << ""; } void tst_qqmllanguage::basicRemote() @@ -2641,6 +2641,8 @@ void tst_qqmllanguage::importsRemote_data() << ""; QTest::newRow("remote import with local") << "import \""+serverdir+"\"\nTestLocal {}" << "QQuickImage" << ""; + QTest::newRow("remote import with qualifier") << "import \""+serverdir+"\" as NS\nNS.NamedLocal {}" << "QQuickImage" + << ""; QTest::newRow("wrong remote import with undeclared local") << "import \""+serverdir+"\"\nWrongTestLocal {}" << "" << "WrongTestLocal is not a type"; QTest::newRow("wrong remote import of internal local") << "import \""+serverdir+"\"\nLocalInternal {}" << "" -- cgit v1.2.3