diff options
author | Matthew Vogt <matthew.vogt@nokia.com> | 2012-04-05 14:10:08 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-05 07:21:51 +0200 |
commit | 5874e29b851101291a93278351da32a5cdbade9c (patch) | |
tree | ee15bf62778906e7acec6dc783ade5b78dab954d /tests/auto/qml/qqmlmoduleplugin | |
parent | 82a048c3cff06dd6e9a97a72d235decb1a39e1c3 (diff) |
Create plugins for Particles and Window submodules
To prevent errors when QML files import QtQuick.Particles or
QtQuick.Window before importing QtQuick itself, create plugins for
these submodules that make their import statements independent of
the QtQuick import.
Remove the automatic re-ordering of the imports list prior to loading
to ensure registered name conflicts can be resolved by changing the
order of import statements.
Task-number: QTBUG-24369
Change-Id: I248625fa30a813dddd2a64feb9a489768931939f
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'tests/auto/qml/qqmlmoduleplugin')
-rw-r--r-- | tests/auto/qml/qqmlmoduleplugin/data/importsNested.1.errors.txt | 1 | ||||
-rw-r--r-- | tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/tests/auto/qml/qqmlmoduleplugin/data/importsNested.1.errors.txt b/tests/auto/qml/qqmlmoduleplugin/data/importsNested.1.errors.txt new file mode 100644 index 0000000000..262193788b --- /dev/null +++ b/tests/auto/qml/qqmlmoduleplugin/data/importsNested.1.errors.txt @@ -0,0 +1 @@ +1:1:module "com.nokia.AutoTestQmlNestedPluginType.Nested" is not installed diff --git a/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp b/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp index c110ce71d3..f6c165840d 100644 --- a/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp +++ b/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp @@ -354,12 +354,12 @@ void tst_qqmlmoduleplugin::importsNested_data() QTest::addColumn<QString>("file"); QTest::addColumn<QString>("errorFile"); - // Note: specific order required to induce failure (no other test case should import the - // plugin used for this test, or the alternate order test will pass spuriously) - QTest::newRow("alternateOrder") << "importsNested.1.qml" << QString(); - QTest::newRow("expectedOrder") << "importsNested.2.qml" << QString(); + // Note: no other test case should import the plugin used for this test, or the + // wrong order test will pass spuriously + QTest::newRow("wrongOrder") << "importsNested.1.qml" << "importsNested.1.errors.txt"; QTest::newRow("missingImport") << "importsNested.3.qml" << "importsNested.3.errors.txt"; QTest::newRow("invalidVersion") << "importsNested.4.qml" << "importsNested.4.errors.txt"; + QTest::newRow("correctOrder") << "importsNested.2.qml" << QString(); } void tst_qqmlmoduleplugin::importsNested() { |