summaryrefslogtreecommitdiffstats
path: root/demos/declarative/minehunt/minehunt.cpp
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2010-10-15 12:24:51 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2010-10-15 12:24:51 (GMT)
commit4f46562b01cc068cd940281f71061386d7f4ecc3 (patch)
tree523fa14f5f8b5c3a66464494425661be6f2c5d99 /demos/declarative/minehunt/minehunt.cpp
parent1637d135906296b2a32f17ed20c86869dc1667e8 (diff)
parente7b372e4705451dfd4443db7e6fc64d4b8f30c68 (diff)
downloadQt-4f46562b01cc068cd940281f71061386d7f4ecc3.zip
Qt-4f46562b01cc068cd940281f71061386d7f4ecc3.tar.gz
Qt-4f46562b01cc068cd940281f71061386d7f4ecc3.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-doc-team into 4.7
Diffstat (limited to 'demos/declarative/minehunt/minehunt.cpp')
-rw-r--r--demos/declarative/minehunt/minehunt.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/demos/declarative/minehunt/minehunt.cpp b/demos/declarative/minehunt/minehunt.cpp
index 9c82f30..709d945 100644
--- a/demos/declarative/minehunt/minehunt.cpp
+++ b/demos/declarative/minehunt/minehunt.cpp
@@ -195,6 +195,7 @@ bool MinehuntGame::flip(int row, int col)
won = false;
hasWonChanged();
setPlaying(false);
+ return true;
}
remaining--;
@@ -202,6 +203,7 @@ bool MinehuntGame::flip(int row, int col)
won = true;
hasWonChanged();
setPlaying(false);
+ return true;
}
return true;
}
@@ -209,7 +211,7 @@ bool MinehuntGame::flip(int row, int col)
bool MinehuntGame::flag(int row, int col)
{
TileData *t = tile(row, col);
- if(!t)
+ if(!t || !playing)
return false;
t->setHasFlag(!t->hasFlag());