summaryrefslogtreecommitdiff
path: root/demos/declarative/minehunt
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-10-15 11:05:43 +0200
committerOlivier Goffart <olivier.goffart@nokia.com>2010-10-15 11:11:31 +0200
commit3ef69b12f6d6905594ef3976b3e16787378dfe6a (patch)
tree1105fb45cddf0afca5929041e679e743e36a1772 /demos/declarative/minehunt
parent1745a0e7799774373ad6252a73d6e8af841db2a1 (diff)
parent9358d77fc1de64d2a8a06bfa4095dcde9f9b009b (diff)
downloadqt4-tools-3ef69b12f6d6905594ef3976b3e16787378dfe6a.tar.gz
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts: src/gui/painting/qpaintengine_raster.cpp tests/auto/declarative/qdeclarativetext/data/alignments_cb.png tests/auto/declarative/qdeclarativetext/data/alignments_cc.png tests/auto/declarative/qdeclarativetext/data/alignments_ct.png
Diffstat (limited to 'demos/declarative/minehunt')
-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 9c82f30fd0..709d9450a7 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());