summaryrefslogtreecommitdiffstats
path: root/examples/declarative/tutorials/samegame/samegame4
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/tutorials/samegame/samegame4')
-rwxr-xr-xexamples/declarative/tutorials/samegame/samegame4/content/samegame.js8
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/samegame4.qmlproject16
2 files changed, 20 insertions, 4 deletions
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/samegame.js b/examples/declarative/tutorials/samegame/samegame4/content/samegame.js
index c527f66..1454f0b 100755
--- a/examples/declarative/tutorials/samegame/samegame4/content/samegame.js
+++ b/examples/declarative/tutorials/samegame/samegame4/content/samegame.js
@@ -51,8 +51,8 @@ function createBlock(column, row) {
if (component.isReady) {
var dynamicObject = component.createObject();
if (dynamicObject == null) {
- print("error creating block");
- print(component.errorsString());
+ console.log("error creating block");
+ console.log(component.errorsString());
return false;
}
dynamicObject.type = Math.floor(Math.random() * 3);
@@ -65,8 +65,8 @@ function createBlock(column, row) {
dynamicObject.spawned = true;
board[index(column, row)] = dynamicObject;
} else {
- print("error loading block component");
- print(component.errorsString());
+ console.log("error loading block component");
+ console.log(component.errorsString());
return false;
}
return true;
diff --git a/examples/declarative/tutorials/samegame/samegame4/samegame4.qmlproject b/examples/declarative/tutorials/samegame/samegame4/samegame4.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/tutorials/samegame/samegame4/samegame4.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}