diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2012-07-23 10:59:30 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-27 03:29:12 +0200 |
commit | 73842034aac7b9788add4f1ba6cf7a9ec6057598 (patch) | |
tree | 0ac7d6316e3b1e0f5ae2118bd96606d53fd3d443 /tests/auto/qml/qrcqml/data | |
parent | 3a045419ba588107d7730978c14643d68340f24b (diff) |
Fix QML import paths in Qt resources.
Allow adding qrc: urls as import paths.
Store an import path of the form :/import/path as qrc:/import/path
which is expected by other parts of the code.
Update documentation for QQmlEngine::addImportPath() to explicitly
state what types of paths are supported.
Add auto tests to check that importing a module from a Qt resource
works.
Change-Id: If0e75c75078a608b20d7a5c4080bccf6241e97f6
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Diffstat (limited to 'tests/auto/qml/qrcqml/data')
-rw-r--r-- | tests/auto/qml/qrcqml/data/imports/QrcImport/Imported.qml | 5 | ||||
-rw-r--r-- | tests/auto/qml/qrcqml/data/imports/QrcImport/qmldir | 1 | ||||
-rw-r--r-- | tests/auto/qml/qrcqml/data/importtest.qml | 5 |
3 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/qml/qrcqml/data/imports/QrcImport/Imported.qml b/tests/auto/qml/qrcqml/data/imports/QrcImport/Imported.qml new file mode 100644 index 0000000000..c2ef0a6906 --- /dev/null +++ b/tests/auto/qml/qrcqml/data/imports/QrcImport/Imported.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 + +Item { + property string tokenProperty: "bar" +} diff --git a/tests/auto/qml/qrcqml/data/imports/QrcImport/qmldir b/tests/auto/qml/qrcqml/data/imports/QrcImport/qmldir new file mode 100644 index 0000000000..8eb1fa5c18 --- /dev/null +++ b/tests/auto/qml/qrcqml/data/imports/QrcImport/qmldir @@ -0,0 +1 @@ +Imported 1.0 Imported.qml diff --git a/tests/auto/qml/qrcqml/data/importtest.qml b/tests/auto/qml/qrcqml/data/importtest.qml new file mode 100644 index 0000000000..dd45bd8b98 --- /dev/null +++ b/tests/auto/qml/qrcqml/data/importtest.qml @@ -0,0 +1,5 @@ +import QrcImport 1.0 + +Imported { + tokenProperty: "foo" +} |