diff options
author | Oliver Wolff <oliver.wolff@digia.com> | 2012-12-13 16:19:46 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-12-14 07:41:59 +0100 |
commit | c48ea83a0da33f702f738707b6a10efcdda75641 (patch) | |
tree | c273a26c31ec15db1eff10f60c435259aeea69bc /examples/quick/tutorials/samegame/samegame4/content/samegame.js | |
parent | 8ac4e62fe50b3f4d9abc8136a98babe4d306f686 (diff) |
Fixed samegame tutorial part 4 to reflect Quick2 state
Change-Id: I61a3d63bc0268256ff6497339a6d97719a59860f
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Diffstat (limited to 'examples/quick/tutorials/samegame/samegame4/content/samegame.js')
-rwxr-xr-x | examples/quick/tutorials/samegame/samegame4/content/samegame.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/quick/tutorials/samegame/samegame4/content/samegame.js b/examples/quick/tutorials/samegame/samegame4/content/samegame.js index ad4d39d7b1..7f1c976480 100755 --- a/examples/quick/tutorials/samegame/samegame4/content/samegame.js +++ b/examples/quick/tutorials/samegame/samegame4/content/samegame.js @@ -1,5 +1,6 @@ /* This script file handles the game logic */ .import QtQuick.LocalStorage 2.0 as Sql +.import QtQuick 2.0 as Quick var maxColumn = 10; var maxRow = 15; @@ -45,12 +46,12 @@ function startNewGame() { function createBlock(column, row) { if (component == null) - component = Qt.createComponent("content/BoomBlock.qml"); + component = Qt.createComponent("BoomBlock.qml"); // Note that if Block.qml was not a local file, component.status would be // Loading and we should wait for the component's statusChanged() signal to // know when the file is downloaded and ready before calling createObject(). - if (component.status == Component.Ready) { + if (component.status == Quick.Component.Ready) { var dynamicObject = component.createObject(gameCanvas); if (dynamicObject == null) { console.log("error creating block"); |