summaryrefslogtreecommitdiff
path: root/demos/declarative
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2010-10-14 10:01:14 +1000
committerAlan Alpert <alan.alpert@nokia.com>2010-10-14 10:01:14 +1000
commitd2a8898e4d42fcf2c4cb51e9117690ae1616e350 (patch)
treeedbf3b5323482de4c151458d787674897b8e093d /demos/declarative
parent28ef9731df2b3cd865af89cc474c5fa20c24e492 (diff)
downloadqt4-tools-d2a8898e4d42fcf2c4cb51e9117690ae1616e350.tar.gz
Make minehunt less cheerful
An instance of failure being improperly shown as victory was rectified. Task-number: QT-3956
Diffstat (limited to 'demos/declarative')
-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());