diff options
author | Matthew Vogt <matthew.vogt@nokia.com> | 2012-01-18 17:12:25 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-24 23:18:34 +0100 |
commit | 149f6afe321ce59aebe4ce2f9dddd1881d0ac22b (patch) | |
tree | 45233b8c808ed553051799b38a6b1e73898db2e1 /tests/auto/declarative/qdeclarativelanguage/data/importJs.1.qml | |
parent | 49212ef6d8934a023e6d0a7b778ec25605a8be7a (diff) |
Allow JS API in modules
Allow modules to export verisoned javascript code into specified
namespaces.
Task-number: QTBUG-20857
Change-Id: Ic968c697ba36cbc4535870ed5eed2fe7f01af11d
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Diffstat (limited to 'tests/auto/declarative/qdeclarativelanguage/data/importJs.1.qml')
-rw-r--r-- | tests/auto/declarative/qdeclarativelanguage/data/importJs.1.qml | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importJs.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/importJs.1.qml new file mode 100644 index 0000000000..eaba98ecd2 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/importJs.1.qml @@ -0,0 +1,12 @@ +import com.nokia.PureJsModule 1.0 +import QtQuick 2.0 + +Item { + property bool test: false + + Component.onCompleted: { + test = ((FirstAPI.greeting() == "Hello") && + (FirstAPI.major == 1) && + (FirstAPI.minor == 0)) + } +} |