summaryrefslogtreecommitdiffstats
path: root/demos/declarative/samegame
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-10-26 07:47:10 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-10-26 07:47:10 (GMT)
commitfdd934b4110ff7c9c5602153384eea9601bf6f7c (patch)
tree58a95b317ffd58356c2aec7f069fa92bd24734bb /demos/declarative/samegame
parent8881a5b0756a8960a2fbbb5d5f476ff1d7505446 (diff)
downloadQt-fdd934b4110ff7c9c5602153384eea9601bf6f7c.zip
Qt-fdd934b4110ff7c9c5602153384eea9601bf6f7c.tar.gz
Qt-fdd934b4110ff7c9c5602153384eea9601bf6f7c.tar.bz2
make remotable
Diffstat (limited to 'demos/declarative/samegame')
-rw-r--r--demos/declarative/samegame/content/qmldir3
-rwxr-xr-xdemos/declarative/samegame/content/samegame.js5
2 files changed, 4 insertions, 4 deletions
diff --git a/demos/declarative/samegame/content/qmldir b/demos/declarative/samegame/content/qmldir
new file mode 100644
index 0000000..a8f8a98
--- /dev/null
+++ b/demos/declarative/samegame/content/qmldir
@@ -0,0 +1,3 @@
+BoomBlock 0.0 BoomBlock.qml
+Button 0.0 Button.qml
+Dialog 0.0 Dialog.qml
diff --git a/demos/declarative/samegame/content/samegame.js b/demos/declarative/samegame/content/samegame.js
index 15bafc4..1b81f87 100755
--- a/demos/declarative/samegame/content/samegame.js
+++ b/demos/declarative/samegame/content/samegame.js
@@ -7,7 +7,7 @@ var board = new Array(maxIndex);
var tileSrc = "content/BoomBlock.qml";
var scoresURL = "http://qtfx-nokia.trolltech.com.au/samegame/scores.php";
var timer;
-var component;
+var component = createComponent(tileSrc);
//Index function used instead of a 2D array
function index(xIdx,yIdx) {
@@ -179,9 +179,6 @@ function floodMoveCheck(xIdx, yIdx, type)
}
function createBlock(xIdx,yIdx){
- if(component==null)
- component = createComponent(tileSrc);
-
// Note that we don't wait for the component to become ready. This will
// only work if the block QML is a local file. Otherwise the component will
// not be ready immediately. There is a statusChanged signal on the