summaryrefslogtreecommitdiffstats
path: root/examples/declarative/modules
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-07-14 04:24:56 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-07-14 04:24:56 (GMT)
commita093c5ef65aa2c28f52f78c8be5bbe7d567646fa (patch)
treedd8f8774eb3e92ec49ee31abd15e4ea2e2bbcb29 /examples/declarative/modules
parent4ca1f77ab54f1e02045dc7e680bd99103f680fea (diff)
downloadQt-a093c5ef65aa2c28f52f78c8be5bbe7d567646fa.zip
Qt-a093c5ef65aa2c28f52f78c8be5bbe7d567646fa.tar.gz
Qt-a093c5ef65aa2c28f52f78c8be5bbe7d567646fa.tar.bz2
Libraries and library versioning.
Diffstat (limited to 'examples/declarative/modules')
-rw-r--r--examples/declarative/modules/builtin-version.qml3
-rw-r--r--examples/declarative/modules/installed-qualified.qml4
-rw-r--r--examples/declarative/modules/installed-version.qml7
-rw-r--r--examples/declarative/modules/installed.qml2
-rw-r--r--examples/declarative/modules/local-qualified.qml7
-rw-r--r--examples/declarative/modules/local.qml2
-rw-r--r--examples/declarative/modules/remote-qualified.qml4
-rw-r--r--examples/declarative/modules/remote-zipped.qml4
-rw-r--r--examples/declarative/modules/wrong-installed-version.qml2
-rw-r--r--examples/declarative/modules/wrong-installed.qml3
-rw-r--r--examples/declarative/modules/wrong-local-qualified.qml4
-rw-r--r--examples/declarative/modules/wrong-local.qml6
-rw-r--r--examples/declarative/modules/zipped-qualified.qml5
-rw-r--r--examples/declarative/modules/zipped.qml5
14 files changed, 58 insertions, 0 deletions
diff --git a/examples/declarative/modules/builtin-version.qml b/examples/declarative/modules/builtin-version.qml
new file mode 100644
index 0000000..78eb860
--- /dev/null
+++ b/examples/declarative/modules/builtin-version.qml
@@ -0,0 +1,3 @@
+import com.nokia.Qt 4.7
+Rect {}
+// and later... SuperRect{}
diff --git a/examples/declarative/modules/installed-qualified.qml b/examples/declarative/modules/installed-qualified.qml
new file mode 100644
index 0000000..c3217cf
--- /dev/null
+++ b/examples/declarative/modules/installed-qualified.qml
@@ -0,0 +1,4 @@
+import com.nokia.Foo as F
+Item {
+ F.Bar { }
+}
diff --git a/examples/declarative/modules/installed-version.qml b/examples/declarative/modules/installed-version.qml
new file mode 100644
index 0000000..4ba9a2b
--- /dev/null
+++ b/examples/declarative/modules/installed-version.qml
@@ -0,0 +1,7 @@
+import com.nokia.Foo 1.6
+import com.nokia.Foo 1.7 as NewFoo
+VerticalLayout {
+ Bar { }
+ Baz { }
+ NewFoo.Bar { }
+}
diff --git a/examples/declarative/modules/installed.qml b/examples/declarative/modules/installed.qml
new file mode 100644
index 0000000..4ce5f76
--- /dev/null
+++ b/examples/declarative/modules/installed.qml
@@ -0,0 +1,2 @@
+import com.nokia.Foo
+Foo.Bar { }
diff --git a/examples/declarative/modules/local-qualified.qml b/examples/declarative/modules/local-qualified.qml
new file mode 100644
index 0000000..36af092
--- /dev/null
+++ b/examples/declarative/modules/local-qualified.qml
@@ -0,0 +1,7 @@
+import "local" as X
+import "local/SubLib" as Y
+
+VerticalLayout {
+ X.Foo { }
+ Y.Bar { }
+}
diff --git a/examples/declarative/modules/local.qml b/examples/declarative/modules/local.qml
new file mode 100644
index 0000000..70c90df
--- /dev/null
+++ b/examples/declarative/modules/local.qml
@@ -0,0 +1,2 @@
+import "local"
+Foo { }
diff --git a/examples/declarative/modules/remote-qualified.qml b/examples/declarative/modules/remote-qualified.qml
new file mode 100644
index 0000000..d807af7
--- /dev/null
+++ b/examples/declarative/modules/remote-qualified.qml
@@ -0,0 +1,4 @@
+import "http://qml.nokia.com/Clock.zip"
+Item {
+ Clock.Hand { ... }
+}
diff --git a/examples/declarative/modules/remote-zipped.qml b/examples/declarative/modules/remote-zipped.qml
new file mode 100644
index 0000000..aee838f
--- /dev/null
+++ b/examples/declarative/modules/remote-zipped.qml
@@ -0,0 +1,4 @@
+import "http://qml.nokia.com/Clock.zip"
+Item {
+ Clock { ... }
+}
diff --git a/examples/declarative/modules/wrong-installed-version.qml b/examples/declarative/modules/wrong-installed-version.qml
new file mode 100644
index 0000000..3d2e3e5
--- /dev/null
+++ b/examples/declarative/modules/wrong-installed-version.qml
@@ -0,0 +1,2 @@
+import com.nokia.Foo 1.5
+Baz { } // Not available in 1.5, only 1.6!
diff --git a/examples/declarative/modules/wrong-installed.qml b/examples/declarative/modules/wrong-installed.qml
new file mode 100644
index 0000000..b0f2355
--- /dev/null
+++ b/examples/declarative/modules/wrong-installed.qml
@@ -0,0 +1,3 @@
+import com.nokia.NonExistent
+
+Rect {}
diff --git a/examples/declarative/modules/wrong-local-qualified.qml b/examples/declarative/modules/wrong-local-qualified.qml
new file mode 100644
index 0000000..92cbbf3
--- /dev/null
+++ b/examples/declarative/modules/wrong-local-qualified.qml
@@ -0,0 +1,4 @@
+import "local" as X
+
+// WRONG: if imported qualified, must qualify
+Foo { }
diff --git a/examples/declarative/modules/wrong-local.qml b/examples/declarative/modules/wrong-local.qml
new file mode 100644
index 0000000..6cb00c4
--- /dev/null
+++ b/examples/declarative/modules/wrong-local.qml
@@ -0,0 +1,6 @@
+import "local"
+
+// WRONG - cannot use qualification to access "local sublibraries".
+// (would have to import lib.SubLib)
+SubLib.Bar {
+}
diff --git a/examples/declarative/modules/zipped-qualified.qml b/examples/declarative/modules/zipped-qualified.qml
new file mode 100644
index 0000000..101df14
--- /dev/null
+++ b/examples/declarative/modules/zipped-qualified.qml
@@ -0,0 +1,5 @@
+// Not currently supported
+import "zips/ClockPack.zip" as CP
+Item {
+ CP.Clock { ... }
+}
diff --git a/examples/declarative/modules/zipped.qml b/examples/declarative/modules/zipped.qml
new file mode 100644
index 0000000..9a0775c
--- /dev/null
+++ b/examples/declarative/modules/zipped.qml
@@ -0,0 +1,5 @@
+// Not currently supported
+import "zips/ClockPack.zip"
+Item {
+ Clock { ... }
+}