summaryrefslogtreecommitdiffstats
path: root/demos/declarative/minehunt
diff options
context:
space:
mode:
Diffstat (limited to 'demos/declarative/minehunt')
-rw-r--r--demos/declarative/minehunt/MinehuntCore/Explosion.qml1
-rw-r--r--demos/declarative/minehunt/minehunt.cpp7
2 files changed, 4 insertions, 4 deletions
diff --git a/demos/declarative/minehunt/MinehuntCore/Explosion.qml b/demos/declarative/minehunt/MinehuntCore/Explosion.qml
index e337c46..172fcc0 100644
--- a/demos/declarative/minehunt/MinehuntCore/Explosion.qml
+++ b/demos/declarative/minehunt/MinehuntCore/Explosion.qml
@@ -1,4 +1,5 @@
import Qt 4.6
+import Qt.labs.particles 1.0
Item {
property bool explode : false
diff --git a/demos/declarative/minehunt/minehunt.cpp b/demos/declarative/minehunt/minehunt.cpp
index 89845ef..5e44d1b 100644
--- a/demos/declarative/minehunt/minehunt.cpp
+++ b/demos/declarative/minehunt/minehunt.cpp
@@ -292,9 +292,8 @@ class MinehuntExtensionPlugin : public QDeclarativeExtensionPlugin
public:
void registerTypes(const char *uri) {
- Q_UNUSED(uri);
- QML_REGISTER_TYPE(SameGameCore, 0, 1, Tile, Tile);
- QML_REGISTER_TYPE(SameGameCore, 0, 1, Game, MinehuntGame);
+ qmlRegisterType<Tile>(uri, 0, 1, "Tile");
+ qmlRegisterType<MinehuntGame>(uri, 0, 1, "Game");
}
void initializeEngine(QDeclarativeEngine *engine, const char *uri) {
@@ -304,7 +303,7 @@ class MinehuntExtensionPlugin : public QDeclarativeExtensionPlugin
MinehuntGame* game = new MinehuntGame();
- engine->rootContext()->addDefaultObject(game);
+ engine->rootContext()->setContextObject(game);
}
};